From: John Garry Date: Thu, 24 Jul 2025 08:12:13 +0000 (+0000) Subject: fs/dax: Reject IOCB_ATOMIC in dax_iomap_rw() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e7fb9b71326f43bab25fb8f18c6bfebd7a628696;p=users%2Fjedix%2Flinux-maple.git fs/dax: Reject IOCB_ATOMIC in dax_iomap_rw() The DAX write path does not support IOCB_ATOMIC, so reject it when set. Suggested-by: Darrick J. Wong Signed-off-by: John Garry Reviewed-by: Darrick J. Wong Signed-off-by: Carlos Maiolino --- diff --git a/fs/dax.c b/fs/dax.c index 4229513806bea..20ecf652c129d 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -1743,6 +1743,9 @@ dax_iomap_rw(struct kiocb *iocb, struct iov_iter *iter, loff_t done = 0; int ret; + if (WARN_ON_ONCE(iocb->ki_flags & IOCB_ATOMIC)) + return -EIO; + if (!iomi.len) return 0;