diff options
| author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-11-07 22:09:24 -0500 |
|---|---|---|
| committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-11-08 05:04:25 -0500 |
| commit | c083234f1592ef3fad3d8083663c5e4a357ec77c (patch) | |
| tree | 8c90897b1fa11920a4edbf043aa59a5123eaa2cb | |
| parent | 5399dd1fc8f5e812db931225ef5f67d89f3b1a56 (diff) | |
nilfs2: fix missing cleanup of gc cache on error cases
This fixes an -rc1 regression brought by the commit:
1cf58fa840472ec7df6bf2312885949ebb308853 ("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>
| -rw-r--r-- | fs/nilfs2/ioctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c index 89dd73ead9ac..d24057d58f17 100644 --- a/fs/nilfs2/ioctl.c +++ b/fs/nilfs2/ioctl.c | |||
| @@ -467,7 +467,6 @@ int nilfs_ioctl_prepare_clean_segments(struct the_nilfs *nilfs, | |||
| 467 | return 0; | 467 | return 0; |
| 468 | 468 | ||
| 469 | failed: | 469 | failed: |
| 470 | nilfs_remove_all_gcinode(nilfs); | ||
| 471 | printk(KERN_ERR "NILFS: GC failed during preparation: %s: err=%d\n", | 470 | printk(KERN_ERR "NILFS: GC failed during preparation: %s: err=%d\n", |
| 472 | msg, ret); | 471 | msg, ret); |
| 473 | return ret; | 472 | return ret; |
| @@ -556,6 +555,8 @@ static int nilfs_ioctl_clean_segments(struct inode *inode, struct file *filp, | |||
| 556 | else | 555 | else |
| 557 | ret = nilfs_clean_segments(inode->i_sb, argv, kbufs); | 556 | ret = nilfs_clean_segments(inode->i_sb, argv, kbufs); |
| 558 | 557 | ||
| 558 | if (ret < 0) | ||
| 559 | nilfs_remove_all_gcinode(nilfs); | ||
| 559 | clear_nilfs_gc_running(nilfs); | 560 | clear_nilfs_gc_running(nilfs); |
| 560 | 561 | ||
| 561 | out_free: | 562 | out_free: |
