diff options
author | Hugh Dickins <hughd@google.com> | 2011-07-25 20:12:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-25 23:57:10 -0400 |
commit | d0823576bf4b8eafce1b56f98613465a0352a376 (patch) | |
tree | bfc182422f665b39d7ae703a198ea7144fea122b /mm/truncate.c | |
parent | b85e0effd3dcbf9118b896232f59526ab1a39a74 (diff) |
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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/truncate.c')
-rw-r--r-- | mm/truncate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/truncate.c b/mm/truncate.c index dc459014f777..232eb2736a79 100644 --- a/mm/truncate.c +++ b/mm/truncate.c | |||
@@ -269,7 +269,7 @@ void truncate_inode_pages_range(struct address_space *mapping, | |||
269 | index = start; | 269 | index = start; |
270 | continue; | 270 | continue; |
271 | } | 271 | } |
272 | if (pvec.pages[0]->index > end) { | 272 | if (index == start && pvec.pages[0]->index > end) { |
273 | pagevec_release(&pvec); | 273 | pagevec_release(&pvec); |
274 | break; | 274 | break; |
275 | } | 275 | } |