Skip to content

Commit b188ad7

Browse files
fdmananakdave
authored andcommitted
btrfs: sysfs: advertise experimental features only if CONFIG_BTRFS_EXPERIMENTAL=y
We are advertising experimental features through sysfs if CONFIG_BTRFS_DEBUG is set, without looking if CONFIG_BTRFS_EXPERIMENTAL is set. This is wrong as it will result in reporting experimental features as supported when CONFIG_BTRFS_EXPERIMENTAL is not set but CONFIG_BTRFS_DEBUG is set. Fix this by checking for CONFIG_BTRFS_EXPERIMENTAL instead of CONFIG_BTRFS_DEBUG. Fixes: 67cd3f2 ("btrfs: split out CONFIG_BTRFS_EXPERIMENTAL from CONFIG_BTRFS_DEBUG") Reviewed-by: Neal Gompa <neal@gompa.dev> Reviewed-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 7d6872c commit b188ad7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/btrfs/sysfs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ BTRFS_FEAT_ATTR_INCOMPAT(simple_quota, SIMPLE_QUOTA);
295295
#ifdef CONFIG_BLK_DEV_ZONED
296296
BTRFS_FEAT_ATTR_INCOMPAT(zoned, ZONED);
297297
#endif
298-
#ifdef CONFIG_BTRFS_DEBUG
298+
#ifdef CONFIG_BTRFS_EXPERIMENTAL
299299
/* Remove once support for extent tree v2 is feature complete */
300300
BTRFS_FEAT_ATTR_INCOMPAT(extent_tree_v2, EXTENT_TREE_V2);
301301
/* Remove once support for raid stripe tree is feature complete. */
@@ -329,7 +329,7 @@ static struct attribute *btrfs_supported_feature_attrs[] = {
329329
#ifdef CONFIG_BLK_DEV_ZONED
330330
BTRFS_FEAT_ATTR_PTR(zoned),
331331
#endif
332-
#ifdef CONFIG_BTRFS_DEBUG
332+
#ifdef CONFIG_BTRFS_EXPERIMENTAL
333333
BTRFS_FEAT_ATTR_PTR(extent_tree_v2),
334334
BTRFS_FEAT_ATTR_PTR(raid_stripe_tree),
335335
#endif

0 commit comments

Comments
 (0)