Commit 7b965e08 authored by Trond Myklebust's avatar Trond Myklebust Committed by Linus Torvalds

[PATCH] VM: invalidate_inode_pages2_range() should not exit early

Fix invalidate_inode_pages2_range() so that it does not immediately exit
just because a single page in the specified range could not be removed.
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5a39e8c6
...@@ -375,10 +375,10 @@ int invalidate_inode_pages2_range(struct address_space *mapping, ...@@ -375,10 +375,10 @@ int invalidate_inode_pages2_range(struct address_space *mapping,
pagevec_init(&pvec, 0); pagevec_init(&pvec, 0);
next = start; next = start;
while (next <= end && !ret && !wrapped && while (next <= end && !wrapped &&
pagevec_lookup(&pvec, mapping, next, pagevec_lookup(&pvec, mapping, next,
min(end - next, (pgoff_t)PAGEVEC_SIZE - 1) + 1)) { min(end - next, (pgoff_t)PAGEVEC_SIZE - 1) + 1)) {
for (i = 0; !ret && i < pagevec_count(&pvec); i++) { for (i = 0; i < pagevec_count(&pvec); i++) {
struct page *page = pvec.pages[i]; struct page *page = pvec.pages[i];
pgoff_t page_index; pgoff_t page_index;
......
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