diff options
| author | Chao Yu <yuchao0@huawei.com> | 2016-09-26 19:45:06 +0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-13 12:34:12 +0200 |
| commit | c6a41501d7ba7c75d9dd18f9fbc3da6eb0d7937c (patch) | |
| tree | 3b1039005345b646367ad41343234941ecf240a8 | |
| parent | 9fdf081989e810476fe43e8157b1d389aabce41a (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>
| -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 f56dccfe4..c0e7fb049 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -986,6 +986,9 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data) bool need_restart_gc = false; bool need_stop_gc = false; bool no_extent_cache = !test_opt(sbi, EXTENT_CACHE); +#ifdef CONFIG_F2FS_FAULT_INJECTION + struct f2fs_fault_info ffi = sbi->fault_info; +#endif /* * Save the old mount options in case we @@ -1081,6 +1084,9 @@ restore_gc: restore_opts: sbi->mount_opt = org_mount_opt; sbi->active_logs = active_logs; +#ifdef CONFIG_F2FS_FAULT_INJECTION + sbi->fault_info = ffi; +#endif return err; } |
