diff options
author | Chao Yu <yuchao0@huawei.com> | 2016-09-26 07:45:06 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-09-30 20:34:34 -0400 |
commit | 2443b8b363917468e2fb163b34c8f14fe1546251 (patch) | |
tree | 3447ea6b56ba350e0040aa60184ce25e8d5b1d40 /fs/f2fs | |
parent | 36dbd3287fefdfceeb6a82997241c26df29882c8 (diff) |
f2fs: fix to recover old fault injection config in ->remount_fs
In ->remount_fs, we didn't recover original fault injection config if
we encounter error, fix it.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/super.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 785d0fdf6e76..40aecd78cccc 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c | |||
@@ -1000,6 +1000,9 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data) | |||
1000 | bool need_restart_gc = false; | 1000 | bool need_restart_gc = false; |
1001 | bool need_stop_gc = false; | 1001 | bool need_stop_gc = false; |
1002 | bool no_extent_cache = !test_opt(sbi, EXTENT_CACHE); | 1002 | bool no_extent_cache = !test_opt(sbi, EXTENT_CACHE); |
1003 | #ifdef CONFIG_F2FS_FAULT_INJECTION | ||
1004 | struct f2fs_fault_info ffi = sbi->fault_info; | ||
1005 | #endif | ||
1003 | 1006 | ||
1004 | /* | 1007 | /* |
1005 | * Save the old mount options in case we | 1008 | * Save the old mount options in case we |
@@ -1095,6 +1098,9 @@ restore_gc: | |||
1095 | restore_opts: | 1098 | restore_opts: |
1096 | sbi->mount_opt = org_mount_opt; | 1099 | sbi->mount_opt = org_mount_opt; |
1097 | sbi->active_logs = active_logs; | 1100 | sbi->active_logs = active_logs; |
1101 | #ifdef CONFIG_F2FS_FAULT_INJECTION | ||
1102 | sbi->fault_info = ffi; | ||
1103 | #endif | ||
1098 | return err; | 1104 | return err; |
1099 | } | 1105 | } |
1100 | 1106 | ||