Skip to content

Commit 277352b

Browse files
Eric SandeenJaegeuk Kim
authored andcommitted
f2fs: consolidate unsupported option handling errors
When certain build-time options are disabled, some mount options are not accepted. For quota and compression, all related options are dismissed with a single error message. For xattr, acl, and fault injection, each option is handled individually. In addition, inline_xattr_size was missed when CONFIG_F2FS_FS_XATTR was disabled. Collapse xattr, acl, and fault injection errors into a single string, for simplicity, and handle the missing inline_xattr_size case. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 parent 64ee750 commit 277352b

1 file changed

Lines changed: 4 additions & 14 deletions

File tree

fs/f2fs/super.c

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -775,16 +775,11 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
775775
break;
776776
#else
777777
case Opt_user_xattr:
778-
f2fs_info(sbi, "user_xattr options not supported");
779-
break;
780778
case Opt_nouser_xattr:
781-
f2fs_info(sbi, "nouser_xattr options not supported");
782-
break;
783779
case Opt_inline_xattr:
784-
f2fs_info(sbi, "inline_xattr options not supported");
785-
break;
786780
case Opt_noinline_xattr:
787-
f2fs_info(sbi, "noinline_xattr options not supported");
781+
case Opt_inline_xattr_size:
782+
f2fs_info(sbi, "xattr options not supported");
788783
break;
789784
#endif
790785
#ifdef CONFIG_F2FS_FS_POSIX_ACL
@@ -796,10 +791,8 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
796791
break;
797792
#else
798793
case Opt_acl:
799-
f2fs_info(sbi, "acl options not supported");
800-
break;
801794
case Opt_noacl:
802-
f2fs_info(sbi, "noacl options not supported");
795+
f2fs_info(sbi, "acl options not supported");
803796
break;
804797
#endif
805798
case Opt_active_logs:
@@ -922,11 +915,8 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
922915
break;
923916
#else
924917
case Opt_fault_injection:
925-
f2fs_info(sbi, "fault_injection options not supported");
926-
break;
927-
928918
case Opt_fault_type:
929-
f2fs_info(sbi, "fault_type options not supported");
919+
f2fs_info(sbi, "fault injection options not supported");
930920
break;
931921
#endif
932922
case Opt_lazytime:

0 commit comments

Comments
 (0)