diff options
author | Chengguang Xu <cgxu519@gmx.com> | 2018-05-09 15:08:23 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-05-28 18:07:30 +0200 |
commit | 891f41cb27cf5036e88053bb0ef688f98fcc945b (patch) | |
tree | c72e4ba3b46850464df32b65c1f7e4ff0ec15ac6 /fs/btrfs/super.c | |
parent | btrfs: remove redundant btrfs_balance_control::fs_info (diff) | |
download | linux-891f41cb27cf5036e88053bb0ef688f98fcc945b.tar.xz linux-891f41cb27cf5036e88053bb0ef688f98fcc945b.zip |
btrfs: return original error code when failing from option parsing
It's not good to overwrite -ENOMEM using -EINVAL when failing from mount
option parsing, so just return original error code.
Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to '')
-rw-r--r-- | fs/btrfs/super.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 0628092b0b1b..c67fafaa2fe7 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -1782,10 +1782,8 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data) } ret = btrfs_parse_options(fs_info, data, *flags); - if (ret) { - ret = -EINVAL; + if (ret) goto restore; - } btrfs_remount_begin(fs_info, old_opts, *flags); btrfs_resize_thread_pool(fs_info, |