提交 d0823576 编写于 作者: H Hugh Dickins 提交者: Linus Torvalds

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: NHugh Dickins <hughd@google.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 b85e0eff
......@@ -269,7 +269,7 @@ void truncate_inode_pages_range(struct address_space *mapping,
index = start;
continue;
}
if (pvec.pages[0]->index > end) {
if (index == start && pvec.pages[0]->index > end) {
pagevec_release(&pvec);
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册