diff options
Diffstat (limited to 'fs/nilfs2/cpfile.c')
-rw-r--r-- | fs/nilfs2/cpfile.c | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/fs/nilfs2/cpfile.c b/fs/nilfs2/cpfile.c index d5ad54e204a5..18737818db63 100644 --- a/fs/nilfs2/cpfile.c +++ b/fs/nilfs2/cpfile.c | |||
@@ -328,19 +328,24 @@ int nilfs_cpfile_delete_checkpoints(struct inode *cpfile, | |||
328 | tnicps += nicps; | 328 | tnicps += nicps; |
329 | nilfs_mdt_mark_buffer_dirty(cp_bh); | 329 | nilfs_mdt_mark_buffer_dirty(cp_bh); |
330 | nilfs_mdt_mark_dirty(cpfile); | 330 | nilfs_mdt_mark_dirty(cpfile); |
331 | if (!nilfs_cpfile_is_in_first(cpfile, cno) && | 331 | if (!nilfs_cpfile_is_in_first(cpfile, cno)) { |
332 | (count = nilfs_cpfile_block_sub_valid_checkpoints( | 332 | count = |
333 | cpfile, cp_bh, kaddr, nicps)) == 0) { | 333 | nilfs_cpfile_block_sub_valid_checkpoints( |
334 | /* make hole */ | 334 | cpfile, cp_bh, kaddr, nicps); |
335 | kunmap_atomic(kaddr, KM_USER0); | 335 | if (count == 0) { |
336 | brelse(cp_bh); | 336 | /* make hole */ |
337 | ret = nilfs_cpfile_delete_checkpoint_block( | 337 | kunmap_atomic(kaddr, KM_USER0); |
338 | cpfile, cno); | 338 | brelse(cp_bh); |
339 | if (ret == 0) | 339 | ret = |
340 | continue; | 340 | nilfs_cpfile_delete_checkpoint_block( |
341 | printk(KERN_ERR "%s: cannot delete block\n", | 341 | cpfile, cno); |
342 | __func__); | 342 | if (ret == 0) |
343 | break; | 343 | continue; |
344 | printk(KERN_ERR | ||
345 | "%s: cannot delete block\n", | ||
346 | __func__); | ||
347 | break; | ||
348 | } | ||
344 | } | 349 | } |
345 | } | 350 | } |
346 | 351 | ||