[PATCH] xfs: Fix build error for implicit function declaration
From: sunliming
Date: Thu Jun 02 2022 - 02:40:22 EST
fs/xfs/libxfs/xfs_btree.c: In function '__xfs_btree_check_lblock':
>> fs/xfs/libxfs/xfs_btree.c:140:23: error: implicit declaration of function 'xfs_daddr_to_xfo'; did you mean 'xfs_daddr_to_agno'? [-Werror=implicit-function-declaration]
140 | fsb = xfs_daddr_to_xfo(xfs_buf_daddr(bp));
| ^~~~~~~~~~~~~~~~
| xfs_daddr_to_agno
cc1: some warnings being treated as errors
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: sunliming <sunliming@xxxxxxxxxx>
---
fs/xfs/scrub/xfile.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/fs/xfs/scrub/xfile.h b/fs/xfs/scrub/xfile.h
index 973b0641b88a..a7ae99d32b5d 100644
--- a/fs/xfs/scrub/xfile.h
+++ b/fs/xfs/scrub/xfile.h
@@ -122,6 +122,13 @@ static inline loff_t xfile_size(struct xfile *xf)
{
return 0;
}
+
+static inline loff_t xfo_to_b(xfileoff_t xfoff) {}
+static inline xfileoff_t b_to_xfo(loff_t pos) {}
+static inline xfileoff_t b_to_xfot(loff_t pos) {}
+static inline xfs_daddr_t xfo_to_daddr(xfileoff_t xfoff) {}
+static inline xfileoff_t xfs_daddr_to_xfo(xfs_daddr_t bb) {}
+static inline xfileoff_t xfs_daddr_to_xfot(xfs_daddr_t bb) {}
#endif /* CONFIG_XFS_IN_MEMORY_FILE */
#endif /* __XFS_SCRUB_XFILE_H__ */
--
2.25.1