iomap: provide iomap_want_unshare_iter() stub for !CONFIG_BLOCK
Subsystems (2)
PATCH 1/1 iomap: provide iomap_want_unshare_iter() stub for !CONFIG_BLOCK
From: Arnd Bergmann <[email protected]>
When block device support is disabled, DAX fails to link with:
aarch64-linux/bin/aarch64-linux-ld: fs/dax.o: in function `dax_file_unshare':
dax.c:(.text+0x2694): undefined reference to `iomap_want_unshare_iter'
Return false in this case, as far as I can tell, this cannot happen without block devices.
--- include/linux/iomap.h | 7 +++++++ 1 file changed, 7 insertions(+)
include/linux/iomap.h +7 -0
@@ -281,7 +281,14 @@ void iomap_invalidate_folio(struct folio *folio, size_t offset, size_t len);bool iomap_dirty_folio (struct address_space *mapping,struct folio *folio);int iomap_file_unshare (struct inode *inode,loff_t pos,loff_t len,const struct iomap_ops *ops); +#ifdef CONFIG_BLOCK bool iomap_want_unshare_iter (const struct iomap_iter *iter); +#else +static inline bool iomap_want_unshare_iter (const struct iomap_iter *iter) +{ +return false; +} +#endif int iomap_zero_range (struct inode *inode,loff_t pos,loff_t len,bool *did_zero,const struct iomap_ops *ops); int iomap_truncate_page(struct inode *inode, loff_t pos, bool *did_zero,
Signature · 1 line
2.39.5
Quoted 4 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
When block device support is disabled, DAX fails to link with:
Quoted 8 lines
aarch64-linux/bin/aarch64-linux-ld:
fs/dax.o: in function `dax_file_unshare':
dax.c:(.text+0x2694): undefined reference to `iomap_want_unshare_iter'Return false in this case, as far as I can tell, this cannot happen without block devices.
Fixes 6ef6a0e821d3 ("iomap: share iomap_unshare_iter predicate code with fsdax")Signed-off-by Arnd Bergmann <[email protected]>
Looks like a fix was submitted already for this [1]
[1]: https://lore.kernel.org/all/[email protected]/
-ritesh
Quoted 25 lines
--- include/linux/iomap.h | 7 +++++++ 1 file changed, 7 insertions(+)include/linux/iomap.h +7
-0@@ -281,7 +281,14 @@ void iomap_invalidate_folio(struct folio *folio, size_t offset, size_t len);bool iomap_dirty_folio (struct address_space *mapping,struct folio *folio);int iomap_file_unshare (struct inode *inode,loff_t pos,loff_t len,const struct iomap_ops *ops); +#ifdef CONFIG_BLOCK bool iomap_want_unshare_iter (const struct iomap_iter *iter); +#else +static inline bool iomap_want_unshare_iter (const struct iomap_iter *iter) +{ +return false; +} +#endif int iomap_zero_range (struct inode *inode,loff_t pos,loff_t len,bool *did_zero,const struct iomap_ops *ops); int iomap_truncate_page(struct inode *inode, loff_t pos, bool *did_zero,Signature · 1 line
2.39.5