summaryrefslogtreecommitdiff
path: root/fs/iomap
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-10-15 06:13:50 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-11-08 16:28:19 +0100
commit4c3575787e988f2a7d1e1b402e5a2fdbafce86c2 (patch)
treec180bb684c66db7278604bb8e4f7102144e4e503 /fs/iomap
parent9bc18bb476e50e32e5d08f2734d63d63e0fa528c (diff)
downloadlinux-4c3575787e988f2a7d1e1b402e5a2fdbafce86c2.tar.gz
linux-4c3575787e988f2a7d1e1b402e5a2fdbafce86c2.tar.bz2
linux-4c3575787e988f2a7d1e1b402e5a2fdbafce86c2.zip
iomap: turn iomap_want_unshare_iter into an inline function
[ Upstream commit 6db388585e486c0261aeef55f8bc63a9b45756c0 ] iomap_want_unshare_iter currently sits in fs/iomap/buffered-io.c, which depends on CONFIG_BLOCK. It is also in used in fs/dax.c whіch has no such dependency. Given that it is a trivial check turn it into an inline in include/linux/iomap.h to fix the DAX && !BLOCK build. Fixes: 6ef6a0e821d3 ("iomap: share iomap_unshare_iter predicate code with fsdax") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20241015041350.118403-1-hch@lst.de Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/iomap')
-rw-r--r--fs/iomap/buffered-io.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 55619cce0542..a05ee2cbb779 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -1270,23 +1270,6 @@ int iomap_file_buffered_write_punch_delalloc(struct inode *inode,
}
EXPORT_SYMBOL_GPL(iomap_file_buffered_write_punch_delalloc);
-bool iomap_want_unshare_iter(const struct iomap_iter *iter)
-{
- /*
- * Don't bother with blocks that are not shared to start with; or
- * mappings that cannot be shared, such as inline data, delalloc
- * reservations, holes or unwritten extents.
- *
- * Note that we use srcmap directly instead of iomap_iter_srcmap as
- * unsharing requires providing a separate source map, and the presence
- * of one is a good indicator that unsharing is needed, unlike
- * IOMAP_F_SHARED which can be set for any data that goes into the COW
- * fork for XFS.
- */
- return (iter->iomap.flags & IOMAP_F_SHARED) &&
- iter->srcmap.type == IOMAP_MAPPED;
-}
-
static loff_t iomap_unshare_iter(struct iomap_iter *iter)
{
struct iomap *iomap = &iter->iomap;