diff options
Diffstat (limited to 'fs/ext4/migrate.c')
-rw-r--r-- | fs/ext4/migrate.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c index a93d5b80f3e2..d641e13e740e 100644 --- a/fs/ext4/migrate.c +++ b/fs/ext4/migrate.c | |||
@@ -262,13 +262,17 @@ static int free_dind_blocks(handle_t *handle, | |||
262 | for (i = 0; i < max_entries; i++) { | 262 | for (i = 0; i < max_entries; i++) { |
263 | if (tmp_idata[i]) { | 263 | if (tmp_idata[i]) { |
264 | extend_credit_for_blkdel(handle, inode); | 264 | extend_credit_for_blkdel(handle, inode); |
265 | ext4_free_blocks(handle, inode, | 265 | ext4_free_blocks(handle, inode, 0, |
266 | le32_to_cpu(tmp_idata[i]), 1, 1); | 266 | le32_to_cpu(tmp_idata[i]), 1, |
267 | EXT4_FREE_BLOCKS_METADATA | | ||
268 | EXT4_FREE_BLOCKS_FORGET); | ||
267 | } | 269 | } |
268 | } | 270 | } |
269 | put_bh(bh); | 271 | put_bh(bh); |
270 | extend_credit_for_blkdel(handle, inode); | 272 | extend_credit_for_blkdel(handle, inode); |
271 | ext4_free_blocks(handle, inode, le32_to_cpu(i_data), 1, 1); | 273 | ext4_free_blocks(handle, inode, 0, le32_to_cpu(i_data), 1, |
274 | EXT4_FREE_BLOCKS_METADATA | | ||
275 | EXT4_FREE_BLOCKS_FORGET); | ||
272 | return 0; | 276 | return 0; |
273 | } | 277 | } |
274 | 278 | ||
@@ -297,7 +301,9 @@ static int free_tind_blocks(handle_t *handle, | |||
297 | } | 301 | } |
298 | put_bh(bh); | 302 | put_bh(bh); |
299 | extend_credit_for_blkdel(handle, inode); | 303 | extend_credit_for_blkdel(handle, inode); |
300 | ext4_free_blocks(handle, inode, le32_to_cpu(i_data), 1, 1); | 304 | ext4_free_blocks(handle, inode, 0, le32_to_cpu(i_data), 1, |
305 | EXT4_FREE_BLOCKS_METADATA | | ||
306 | EXT4_FREE_BLOCKS_FORGET); | ||
301 | return 0; | 307 | return 0; |
302 | } | 308 | } |
303 | 309 | ||
@@ -308,8 +314,10 @@ static int free_ind_block(handle_t *handle, struct inode *inode, __le32 *i_data) | |||
308 | /* ei->i_data[EXT4_IND_BLOCK] */ | 314 | /* ei->i_data[EXT4_IND_BLOCK] */ |
309 | if (i_data[0]) { | 315 | if (i_data[0]) { |
310 | extend_credit_for_blkdel(handle, inode); | 316 | extend_credit_for_blkdel(handle, inode); |
311 | ext4_free_blocks(handle, inode, | 317 | ext4_free_blocks(handle, inode, 0, |
312 | le32_to_cpu(i_data[0]), 1, 1); | 318 | le32_to_cpu(i_data[0]), 1, |
319 | EXT4_FREE_BLOCKS_METADATA | | ||
320 | EXT4_FREE_BLOCKS_FORGET); | ||
313 | } | 321 | } |
314 | 322 | ||
315 | /* ei->i_data[EXT4_DIND_BLOCK] */ | 323 | /* ei->i_data[EXT4_DIND_BLOCK] */ |
@@ -419,7 +427,8 @@ static int free_ext_idx(handle_t *handle, struct inode *inode, | |||
419 | } | 427 | } |
420 | put_bh(bh); | 428 | put_bh(bh); |
421 | extend_credit_for_blkdel(handle, inode); | 429 | extend_credit_for_blkdel(handle, inode); |
422 | ext4_free_blocks(handle, inode, block, 1, 1); | 430 | ext4_free_blocks(handle, inode, 0, block, 1, |
431 | EXT4_FREE_BLOCKS_METADATA | EXT4_FREE_BLOCKS_FORGET); | ||
423 | return retval; | 432 | return retval; |
424 | } | 433 | } |
425 | 434 | ||