Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

authored by

Chao Yu and committed by
Jaegeuk Kim
9b6ed143 6ce48b0c

+4
+4
fs/f2fs/sysfs.c
··· 580 580 #endif 581 581 F2FS_FEATURE_RO_ATTR(sb_checksum, FEAT_SB_CHECKSUM); 582 582 F2FS_FEATURE_RO_ATTR(casefold, FEAT_CASEFOLD); 583 + #ifdef CONFIG_F2FS_FS_COMPRESSION 583 584 F2FS_FEATURE_RO_ATTR(compression, FEAT_COMPRESSION); 585 + #endif 584 586 585 587 #define ATTR_LIST(name) (&f2fs_attr_##name.attr) 586 588 static struct attribute *f2fs_attrs[] = { ··· 664 662 #endif 665 663 ATTR_LIST(sb_checksum), 666 664 ATTR_LIST(casefold), 665 + #ifdef CONFIG_F2FS_FS_COMPRESSION 667 666 ATTR_LIST(compression), 667 + #endif 668 668 NULL, 669 669 }; 670 670 ATTRIBUTE_GROUPS(f2fs_feat);