Skip to content

Commit e1c71a8

Browse files
drosen-googleksacilotto
authored andcommitted
f2fs: Show casefolding support only when supported
BugLink: https://bugs.launchpad.net/bugs/1939442 commit 39307f8 upstream. The casefolding feature is only supported when CONFIG_UNICODE is set. This modifies the feature list f2fs presents under sysfs accordingly. Fixes: 5aba543 ("f2fs: include charset encoding information in the superblock") Cc: [email protected] # v5.4+ Signed-off-by: Daniel Rosenberg <[email protected]> Reviewed-by: Eric Biggers <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Kamal Mostafa <[email protected]> Signed-off-by: Kelsey Skunberg <[email protected]>
1 parent ffeb2b9 commit e1c71a8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fs/f2fs/sysfs.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,9 @@ F2FS_FEATURE_RO_ATTR(lost_found, FEAT_LOST_FOUND);
499499
F2FS_FEATURE_RO_ATTR(verity, FEAT_VERITY);
500500
#endif
501501
F2FS_FEATURE_RO_ATTR(sb_checksum, FEAT_SB_CHECKSUM);
502+
#ifdef CONFIG_UNICODE
502503
F2FS_FEATURE_RO_ATTR(casefold, FEAT_CASEFOLD);
504+
#endif
503505

504506
#define ATTR_LIST(name) (&f2fs_attr_##name.attr)
505507
static struct attribute *f2fs_attrs[] = {
@@ -568,7 +570,9 @@ static struct attribute *f2fs_feat_attrs[] = {
568570
ATTR_LIST(verity),
569571
#endif
570572
ATTR_LIST(sb_checksum),
573+
#ifdef CONFIG_UNICODE
571574
ATTR_LIST(casefold),
575+
#endif
572576
NULL,
573577
};
574578
ATTRIBUTE_GROUPS(f2fs_feat);

0 commit comments

Comments
 (0)