]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Fix bug in xdr_kunmap()
authorTrond Myklebust <trond.myklebust@fys.uio.no>
Mon, 15 Jul 2002 14:38:14 +0000 (07:38 -0700)
committerTrond Myklebust <trond.myklebust@fys.uio.no>
Mon, 15 Jul 2002 14:38:14 +0000 (07:38 -0700)
The following patch fixes a bug in xdr_kunmap() that has been known to
deadlock TCP mounts on highmem systems.  It also removes an unnecessary
call to flush_page_to_ram().

net/sunrpc/xdr.c

index 1533e0076eca8b8a5c954c3b1f8b804795a63070..512a3887da3498401d099d0c8789372153ebb8ef 100644 (file)
@@ -242,11 +242,11 @@ void xdr_kunmap(struct xdr_buf *xdr, size_t base)
                return;
        if (base || xdr->page_base) {
                pglen -= base;
+               base  += xdr->page_base;
                ppage += base >> PAGE_CACHE_SHIFT;
        }
        for (;;) {
                flush_dcache_page(*ppage);
-               flush_page_to_ram(*ppage);
                kunmap(*ppage);
                if (pglen <= PAGE_CACHE_SIZE)
                        break;