Message ID | 20100209153906.GC15318@atrey.karlin.mff.cuni.cz |
---|---|
State | New, archived |
Headers | show |
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index c818972..1680007 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -2127,17 +2127,16 @@ static void ext4_da_block_invalidatepages(struct mpage_da_data *mpd, break; for (i = 0; i < nr_pages; i++) { struct page *page = pvec.pages[i]; - index = page->index; - if (index > end) + if (page->index > end) break; - index++; - BUG_ON(!PageLocked(page)); BUG_ON(PageWriteback(page)); block_invalidatepage(page, 0); ClearPageUptodate(page); unlock_page(page); } + index = pvec.pages[nr_pages - 1]->index + 1; + pagevec_release(&pvec); } return; }