lkml.org 
[lkml]   [2011]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 13/14] mm: pincer in truncate_inode_pages_range
truncate_inode_pages_range()'s final loop has a nice pincer property,
bringing start and end together, squeezing out the last pages. But
the range handling missed out on that, just sliding up the range,
perhaps letting pages come in behind it. Add one more test to give
it the same pincer effect.

Signed-off-by: Hugh Dickins <hughd@google.com>
---
mm/truncate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- linux.orig/mm/truncate.c 2011-05-30 15:01:01.660093602 -0700
+++ linux/mm/truncate.c 2011-05-30 15:03:28.688822856 -0700
@@ -269,7 +269,7 @@ void truncate_inode_pages_range(struct a
index = start;
continue;
}
- if (pvec.pages[0]->index > end) {
+ if (index == start && pvec.pages[0]->index > end) {
pagevec_release(&pvec);
break;
}

\
 
 \ /
  Last update: 2011-05-31 02:57    [W:0.215 / U:0.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site