diff -X /home/cel/src/linux/dont-diff -Naurp old/net/sunrpc/xdr.c new/net/sunrpc/xdr.c --- old/net/sunrpc/xdr.c Tue Oct 28 15:24:39 2003 +++ new/net/sunrpc/xdr.c Tue Oct 28 15:41:31 2003 @@ -279,6 +279,11 @@ void xdr_kunmap(struct xdr_buf *xdr, uns pglen -= base; base += xdr->page_base; ppage += base >> PAGE_CACHE_SHIFT; + /* Note: The offset means that the length of the first + * page is really (PAGE_CACHE_SIZE - (base & ~PAGE_CACHE_MASK)). + * In order to avoid an extra test inside the loop, + * we bump pglen here, and just subtract PAGE_CACHE_SIZE... */ + pglen += base & ~PAGE_CACHE_MASK; } for (;;) { flush_dcache_page(*ppage);