diff options
| author | Chao Yu <yuchao0@huawei.com> | 2018-03-01 23:40:32 +0800 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-04-08 03:51:11 -0700 |
| commit | 6bc490f0eedcd21df5a41e9369cdafed154c9e95 (patch) | |
| tree | 818cbf9f10014a10c829a84d86547990ae1db621 | |
| parent | 0c9c3e034410c4b1410fc3dad4d2657d71539ae4 (diff) | |
f2fs: fix to restore old mount option in ->remount_fs
This patch fixes to restore old mount option once we encounter failure
in ->remount_fs.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| -rw-r--r-- | fs/f2fs/super.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 8db821b2d78e..dca74d62d9d4 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1341,6 +1341,11 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data) bool no_extent_cache = !test_opt(sbi, EXTENT_CACHE); int old_whint_mode = sbi->whint_mode; int old_alloc_mode = sbi->alloc_mode; + int old_inline_xattr_size = sbi->inline_xattr_size; + block_t old_root_reserved_blocks = sbi->root_reserved_blocks; + kuid_t old_resuid = sbi->s_resuid; + kgid_t old_resgid = sbi->s_resgid; + int old_write_io_size_bits = sbi->write_io_size_bits; #ifdef CONFIG_F2FS_FAULT_INJECTION struct f2fs_fault_info ffi = sbi->fault_info; #endif @@ -1490,6 +1495,11 @@ restore_opts: sbi->s_qf_names[i] = s_qf_names[i]; } #endif + sbi->write_io_size_bits = old_write_io_size_bits; + sbi->s_resgid = old_resgid; + sbi->s_resuid = old_resuid; + sbi->root_reserved_blocks = old_root_reserved_blocks; + sbi->inline_xattr_size = old_inline_xattr_size; sbi->alloc_mode = old_alloc_mode; sbi->whint_mode = old_whint_mode; sbi->mount_opt = org_mount_opt; |
