diff mbox series

[for-next,1/2] btrfs: fix compilation error for !CONFIG_BLK_DEV_ZONED

Message ID 7a77ab0c2204a5819f5734a9645a92b54792752d.1612005682.git.johannes.thumshirn@wdc.com (mailing list archive)
State New, archived
Headers show
Series Fix compilation and checker errors in zoned series | expand

Commit Message

Johannes Thumshirn Jan. 30, 2021, 11:26 a.m. UTC
The !CONFIG_BLK_DEV_ZONED case didn't compile correctly because the
function btrfs_use_zoned_append() was declared as static inline in zoned.h
resulting in multiple definitions of the function.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 086cd11a1848 ("btrfs: cache if block-group is on a sequential zone")
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 fs/btrfs/zoned.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/btrfs/zoned.h b/fs/btrfs/zoned.h
index 52789da61fa3..cbd208192ce5 100644
--- a/fs/btrfs/zoned.h
+++ b/fs/btrfs/zoned.h
@@ -148,7 +148,8 @@  static inline void btrfs_redirty_list_add(struct btrfs_transaction *trans,
 					  struct extent_buffer *eb) { }
 static inline void btrfs_free_redirty_list(struct btrfs_transaction *trans) { }
 
-bool btrfs_use_zone_append(struct btrfs_inode *inode, struct extent_map *em)
+static inline bool btrfs_use_zone_append(struct btrfs_inode *inode,
+					 struct extent_map *em)
 {
 	return false;
 }