X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=mm%2Ftruncate.c;h=0f4b6d18ab0ed663360e0fba11f46f23e8c6b5b3;hb=2848e647402719d4a8d03141361caed60f2668da;hp=ebf3fcb4115b8c664e54e4c47e02968ed93ab0be;hpb=920841d8d1d61bc12b43f95a579a5374f6d98f81;p=powerpc.git diff --git a/mm/truncate.c b/mm/truncate.c index ebf3fcb411..0f4b6d18ab 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;