]> www.infradead.org Git - users/willy/pagecache.git/commit
btrfs: sysfs: advertise experimental features only if CONFIG_BTRFS_EXPERIMENTAL=y
authorFilipe Manana <fdmanana@suse.com>
Thu, 14 Nov 2024 15:38:27 +0000 (15:38 +0000)
committerDavid Sterba <dsterba@suse.com>
Thu, 28 Nov 2024 19:46:59 +0000 (20:46 +0100)
commitb188ad7791899da8afe937e439e3086ffddd84a8
treee42922dc0701d9ecbb123633bb4cd3c7d91ba85f
parent7d6872ccbd56c310d2b9658ecaeafeda258727b6
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: 67cd3f221769 ("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>
fs/btrfs/sysfs.c