inode_dax() is exported, but it's declared only in the private header of the dax drivers, so code outside of drivers/dax can't use it to find the dax_device of a device-dax file. Move its declaration to linux/dax.h, next to dax_alive(). This will be used to import device-dax pages into a BPF arena, which has to check that the dax device is alive before it pins the pages. No functional change. Signed-off-by: Andrea Righi --- drivers/dax/dax-private.h | 1 - include/linux/dax.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dax/dax-private.h b/drivers/dax/dax-private.h index 607a53a91f58b..dce13ca20ecf6 100644 --- a/drivers/dax/dax-private.h +++ b/drivers/dax/dax-private.h @@ -11,7 +11,6 @@ /* private routines between core files */ struct dax_device; -struct dax_device *inode_dax(struct inode *inode); struct inode *dax_inode(struct dax_device *dax_dev); int dax_bus_init(void); void dax_bus_exit(void); diff --git a/include/linux/dax.h b/include/linux/dax.h index 2e0797e4d4088..d5f9a1ca03212 100644 --- a/include/linux/dax.h +++ b/include/linux/dax.h @@ -235,6 +235,7 @@ static inline void dax_break_layout_final(struct inode *inode) } #endif +struct dax_device *inode_dax(struct inode *inode); bool dax_alive(struct dax_device *dax_dev); void *dax_get_private(struct dax_device *dax_dev); int dax_set_ops(struct dax_device *dax_dev, const struct dax_operations *ops); -- 2.56.1