[PATCH] Fix bug in xdr_kunmap() (resend)

Trond Myklebust (trond.myklebust@fys.uio.no)
Tue, 16 Jul 2002 19:58:12 +0200


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().

Cheers,
Trond

diff -u --recursive --new-file linux-2.5.25/net/sunrpc/xdr.c linux-2.5.25-fix_kmap/net/sunrpc/xdr.c
--- linux-2.5.25/net/sunrpc/xdr.c Thu Jun 6 12:23:23 2002
+++ linux-2.5.25-fix_kmap/net/sunrpc/xdr.c Tue Jul 16 18:47:07 2002
@@ -242,11 +242,11 @@
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;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/