btrfs: optimize out btrfs_is_zoned for !CONFIG_BLK_DEV_ZONED
authorChristoph Hellwig <hch@lst.de>
Wed, 24 May 2023 15:03:04 +0000 (17:03 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2023 11:59:32 +0000 (13:59 +0200)
commitdd8b7b0416704efb0dcd74801a1a48aa221f1cf5
tree99a7aff42b738e57a256676551143d12389f3185
parent99f09ce309b8307ce8dca209f936e99a7c332214
btrfs: optimize out btrfs_is_zoned for !CONFIG_BLK_DEV_ZONED

Add an IS_ENABLED check for CONFIG_BLK_DEV_ZONED in addition to the
run-time check for the zone size.  This will allow to make use of
compiler dead code elimination for code guarded by btrfs_is_zoned, and
for example provide just a dangling prototype for a function instead of
adding a stub.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/fs.h