On Mon, Oct 27, 2025 at 07:34:52PM +0100, Greg Kroah-Hartman wrote:
5.10-stable review patch. If anyone has any objections, please let me know.
From: Christoph Hellwig hch@lst.de
[ Upstream commit ca289e0b95afa973d204c77a4ad5c37e06145fbf ]
Switch the dax_iomap_rw implementation to use iomap_iter.
Signed-off-by: Christoph Hellwig hch@lst.de Reviewed-by: Darrick J. Wong djwong@kernel.org Signed-off-by: Darrick J. Wong djwong@kernel.org Stable-dep-of: 154d1e7ad9e5 ("dax: skip read lock assertion for read-only filesystems") Signed-off-by: Sasha Levin sashal@kernel.org
fs/dax.c | 49 ++++++++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 25 deletions(-)
diff --git a/fs/dax.c b/fs/dax.c index 3e7e9a57fd28c..6619a71b57bbe 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -1104,20 +1104,21 @@ s64 dax_iomap_zero(loff_t pos, u64 length, struct iomap *iomap) return size; } -static loff_t -dax_iomap_actor(struct inode *inode, loff_t pos, loff_t length, void *data,
struct iomap *iomap, struct iomap *srcmap)+static loff_t dax_iomap_iter(const struct iomap_iter *iomi,
struct iov_iter *iter){
- const struct iomap *iomap = &iomi->iomap;
The constification of iomap in this change depends on commit 7e4f4b2d689d ("fsdax: mark the iomap argument to dax_iomap_sector as const") from the upstream series to avoid compiler warnings, which may be fatal in the case of clang since it is a subwarning of -Wincompatible-pointer-types:
fs/dax.c: In function 'dax_iomap_iter': fs/dax.c:1147:58: warning: passing argument 1 of 'dax_iomap_sector' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 1147 | const sector_t sector = dax_iomap_sector(iomap, pos); | ^~~~~ fs/dax.c:1009:48: note: expected 'struct iomap *' but argument is of type 'const struct iomap *' 1009 | static sector_t dax_iomap_sector(struct iomap *iomap, loff_t pos) | ~~~~~~~~~~~~~~^~~~~
fs/dax.c:1147:44: error: passing 'const struct iomap *' to parameter of type 'struct iomap *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] 1147 | const sector_t sector = dax_iomap_sector(iomap, pos); | ^~~~~ fs/dax.c:1009:48: note: passing argument to parameter 'iomap' here 1009 | static sector_t dax_iomap_sector(struct iomap *iomap, loff_t pos) | ^
Cheers, Nathan