Skip to content

Commit

Permalink
nilfs2: fix missing cleanup of gc cache on error cases
Browse files Browse the repository at this point in the history
This fixes an -rc1 regression brought by the commit:
1cf58fa ("nilfs2: shorten freeze
period due to GC in write operation v3").

Although the patch moved out a function call of
nilfs_ioctl_move_blocks() to nilfs_ioctl_clean_segments() from
nilfs_ioctl_prepare_clean_segments(), it didn't move corresponding
cleanup job needed for the error case.

This will move the missing cleanup job to the destination function.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Acked-by: Jiro SEKIBA <jir@unicus.jp>
  • Loading branch information
Ryusuke Konishi committed Nov 8, 2009
1 parent 5399dd1 commit c083234
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/nilfs2/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,6 @@ int nilfs_ioctl_prepare_clean_segments(struct the_nilfs *nilfs,
return 0;

failed:
nilfs_remove_all_gcinode(nilfs);
printk(KERN_ERR "NILFS: GC failed during preparation: %s: err=%d\n",
msg, ret);
return ret;
Expand Down Expand Up @@ -556,6 +555,8 @@ static int nilfs_ioctl_clean_segments(struct inode *inode, struct file *filp,
else
ret = nilfs_clean_segments(inode->i_sb, argv, kbufs);

if (ret < 0)
nilfs_remove_all_gcinode(nilfs);
clear_nilfs_gc_running(nilfs);

out_free:
Expand Down

0 comments on commit c083234

Please sign in to comment.