Skip to content

Commit 9b6ed14

Browse files
chaseyuJaegeuk Kim
authored andcommitted
f2fs: add missing CONFIG_F2FS_FS_COMPRESSION
Compression sysfs node should not be shown if f2fs module disables compression feature. Signed-off-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 6ce48b0 commit 9b6ed14

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
@@ -580,7 +580,9 @@ F2FS_FEATURE_RO_ATTR(verity, FEAT_VERITY);
580580
#endif
581581
F2FS_FEATURE_RO_ATTR(sb_checksum, FEAT_SB_CHECKSUM);
582582
F2FS_FEATURE_RO_ATTR(casefold, FEAT_CASEFOLD);
583+
#ifdef CONFIG_F2FS_FS_COMPRESSION
583584
F2FS_FEATURE_RO_ATTR(compression, FEAT_COMPRESSION);
585+
#endif
584586

585587
#define ATTR_LIST(name) (&f2fs_attr_##name.attr)
586588
static struct attribute *f2fs_attrs[] = {
@@ -662,7 +664,9 @@ static struct attribute *f2fs_feat_attrs[] = {
662664
#endif
663665
ATTR_LIST(sb_checksum),
664666
ATTR_LIST(casefold),
667+
#ifdef CONFIG_F2FS_FS_COMPRESSION
665668
ATTR_LIST(compression),
669+
#endif
666670
NULL,
667671
};
668672
ATTRIBUTE_GROUPS(f2fs_feat);

0 commit comments

Comments
 (0)