Skip to contentSkip to conversation

Fix bug in xdr_kunmap() (resend)

PATCH New Trond Myklebust 1 participant 1 message Jul 16, 2002

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix bug in xdr_kunmap() (resend)

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

net/sunrpc/xdr.c +1 -1
diff -u --recursive --new-file linux-2.5.25/net/sunrpc/xdr.c linux-2.5.25-fix_kmap/net/sunrpc/xdr.c
@@ -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;