Commit ad4d2648 authored by Trond Myklebust's avatar Trond Myklebust

[PATCH] Fix bug in xdr_kunmap()

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().
parent 7fde4915
...@@ -242,11 +242,11 @@ void xdr_kunmap(struct xdr_buf *xdr, size_t base) ...@@ -242,11 +242,11 @@ void xdr_kunmap(struct xdr_buf *xdr, size_t base)
return; return;
if (base || xdr->page_base) { if (base || xdr->page_base) {
pglen -= base; pglen -= base;
base += xdr->page_base;
ppage += base >> PAGE_CACHE_SHIFT; ppage += base >> PAGE_CACHE_SHIFT;
} }
for (;;) { for (;;) {
flush_dcache_page(*ppage); flush_dcache_page(*ppage);
flush_page_to_ram(*ppage);
kunmap(*ppage); kunmap(*ppage);
if (pglen <= PAGE_CACHE_SIZE) if (pglen <= PAGE_CACHE_SIZE)
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment