Commit da8b40ad authored by Trond Myklebust's avatar Trond Myklebust

[PATCH] another kmap imbalance in 2.4.x/2.5.x RPC

  We've uncovered yet another kmap imbalance in the new RPC code.  This
looks like it might be the last one (my debugging printks have been
unable to unearth any more).  One line fix + 4 line comment appended.
parent 3214cfb3
...@@ -244,6 +244,11 @@ void xdr_kunmap(struct xdr_buf *xdr, size_t base) ...@@ -244,6 +244,11 @@ void xdr_kunmap(struct xdr_buf *xdr, size_t base)
pglen -= base; pglen -= base;
base += xdr->page_base; base += xdr->page_base;
ppage += base >> PAGE_CACHE_SHIFT; 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 (;;) { for (;;) {
flush_dcache_page(*ppage); flush_dcache_page(*ppage);
......
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