Skip to content

Commit

Permalink
[PATCH] VM: invalidate_inode_pages2_range() should not exit early
Browse files Browse the repository at this point in the history
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: Trond Myklebust <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Trond Myklebust authored and Linus Torvalds committed Mar 1, 2007
1 parent 5a39e8c commit 7b965e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mm/truncate.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,10 @@ int invalidate_inode_pages2_range(struct address_space *mapping,

pagevec_init(&pvec, 0);
next = start;
while (next <= end && !ret && !wrapped &&
while (next <= end && !wrapped &&
pagevec_lookup(&pvec, mapping, next,
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];
pgoff_t page_index;

Expand Down

0 comments on commit 7b965e0

Please sign in to comment.