aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/inode.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index fd369dbce6af..e878c3a7aaf0 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2165,8 +2165,7 @@ static int mpage_da_submit_io(struct mpage_da_data *mpd,
2165 return ret; 2165 return ret;
2166} 2166}
2167 2167
2168static void ext4_da_block_invalidatepages(struct mpage_da_data *mpd, 2168static void ext4_da_block_invalidatepages(struct mpage_da_data *mpd)
2169 sector_t logical, long blk_cnt)
2170{ 2169{
2171 int nr_pages, i; 2170 int nr_pages, i;
2172 pgoff_t index, end; 2171 pgoff_t index, end;
@@ -2174,9 +2173,8 @@ static void ext4_da_block_invalidatepages(struct mpage_da_data *mpd,
2174 struct inode *inode = mpd->inode; 2173 struct inode *inode = mpd->inode;
2175 struct address_space *mapping = inode->i_mapping; 2174 struct address_space *mapping = inode->i_mapping;
2176 2175
2177 index = logical >> (PAGE_CACHE_SHIFT - inode->i_blkbits); 2176 index = mpd->first_page;
2178 end = (logical + blk_cnt - 1) >> 2177 end = mpd->next_page - 1;
2179 (PAGE_CACHE_SHIFT - inode->i_blkbits);
2180 while (index <= end) { 2178 while (index <= end) {
2181 nr_pages = pagevec_lookup(&pvec, mapping, index, PAGEVEC_SIZE); 2179 nr_pages = pagevec_lookup(&pvec, mapping, index, PAGEVEC_SIZE);
2182 if (nr_pages == 0) 2180 if (nr_pages == 0)
@@ -2312,8 +2310,7 @@ static void mpage_da_map_and_submit(struct mpage_da_data *mpd)
2312 ext4_print_free_blocks(mpd->inode); 2310 ext4_print_free_blocks(mpd->inode);
2313 } 2311 }
2314 /* invalidate all the pages */ 2312 /* invalidate all the pages */
2315 ext4_da_block_invalidatepages(mpd, next, 2313 ext4_da_block_invalidatepages(mpd);
2316 mpd->b_size >> mpd->inode->i_blkbits);
2317 2314
2318 /* Mark this page range as having been completed */ 2315 /* Mark this page range as having been completed */
2319 mpd->io_done = 1; 2316 mpd->io_done = 1;