From: Trond Myklebust Date: Thu, 1 Mar 2007 04:13:55 +0000 (-0800) Subject: [PATCH] VM: invalidate_inode_pages2_range() should not exit early X-Git-Tag: v2.6.21-rc3~153 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=7b965e0884cee430ffe5dc81cdb117b9316b0549;p=linux-2.6-omap-h63xx.git [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: Trond Myklebust Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/truncate.c b/mm/truncate.c index ebf3fcb4115..0f4b6d18ab0 100644 --- a/mm/truncate.c +++ b/mm/truncate.c @@ -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;