|
@@ -664,8 +664,11 @@ static int nilfs_ioctl_clean_segments(struct inode *inode, struct file *filp,
|
|
if (ret < 0)
|
|
if (ret < 0)
|
|
printk(KERN_ERR "NILFS: GC failed during preparation: "
|
|
printk(KERN_ERR "NILFS: GC failed during preparation: "
|
|
"cannot read source blocks: err=%d\n", ret);
|
|
"cannot read source blocks: err=%d\n", ret);
|
|
- else
|
|
|
|
|
|
+ else {
|
|
|
|
+ if (nilfs_sb_need_update(nilfs))
|
|
|
|
+ set_nilfs_discontinued(nilfs);
|
|
ret = nilfs_clean_segments(inode->i_sb, argv, kbufs);
|
|
ret = nilfs_clean_segments(inode->i_sb, argv, kbufs);
|
|
|
|
+ }
|
|
|
|
|
|
nilfs_remove_all_gcinodes(nilfs);
|
|
nilfs_remove_all_gcinodes(nilfs);
|
|
clear_nilfs_gc_running(nilfs);
|
|
clear_nilfs_gc_running(nilfs);
|