Commit 69c0dd29 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim

f2fs: ignore compress mount option on image w/o compression feature

to keep consistent with behavior when passing compress mount option
to kernel w/o compression feature, so that mount may not fail on
such condition.
Reported-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent ca313c82
...@@ -871,8 +871,8 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount) ...@@ -871,8 +871,8 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
#ifdef CONFIG_F2FS_FS_COMPRESSION #ifdef CONFIG_F2FS_FS_COMPRESSION
case Opt_compress_algorithm: case Opt_compress_algorithm:
if (!f2fs_sb_has_compression(sbi)) { if (!f2fs_sb_has_compression(sbi)) {
f2fs_err(sbi, "Compression feature if off"); f2fs_info(sbi, "Image doesn't support compression");
return -EINVAL; break;
} }
name = match_strdup(&args[0]); name = match_strdup(&args[0]);
if (!name) if (!name)
...@@ -897,8 +897,8 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount) ...@@ -897,8 +897,8 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
break; break;
case Opt_compress_log_size: case Opt_compress_log_size:
if (!f2fs_sb_has_compression(sbi)) { if (!f2fs_sb_has_compression(sbi)) {
f2fs_err(sbi, "Compression feature is off"); f2fs_info(sbi, "Image doesn't support compression");
return -EINVAL; break;
} }
if (args->from && match_int(args, &arg)) if (args->from && match_int(args, &arg))
return -EINVAL; return -EINVAL;
...@@ -912,8 +912,8 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount) ...@@ -912,8 +912,8 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
break; break;
case Opt_compress_extension: case Opt_compress_extension:
if (!f2fs_sb_has_compression(sbi)) { if (!f2fs_sb_has_compression(sbi)) {
f2fs_err(sbi, "Compression feature is off"); f2fs_info(sbi, "Image doesn't support compression");
return -EINVAL; break;
} }
name = match_strdup(&args[0]); name = match_strdup(&args[0]);
if (!name) if (!name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment