Commit aa56ea3b authored by Darrick J. Wong's avatar Darrick J. Wong Committed by Greg Kroah-Hartman
Browse files

iomap: share iomap_unshare_iter predicate code with fsdax



[ Upstream commit 6ef6a0e8 ]

The predicate code that iomap_unshare_iter uses to decide if it's really
needs to unshare a file range mapping should be shared with the fsdax
version, because right now they're opencoded and inconsistent.

Note that we simplify the predicate logic a bit -- we no longer allow
unsharing of inline data mappings, but there aren't any filesystems that
allow shared inline data currently.

This is a fix in the sense that it should have been ported to fsdax.

Fixes: b53fdb21 ("iomap: improve shared block detection in iomap_unshare_iter")
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
Link: https://lore.kernel.org/r/172796813294.1131942.15762084021076932620.stgit@frogsfrogsfrogs


Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
Stable-dep-of: 50793801 ("fsdax: dax_unshare_iter needs to copy entire blocks")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent eb4c6fe2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment