Skip to content

Commit e7fb9b7

Browse files
johnpgarrycmaiolino
authored andcommitted
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 <[email protected]> Signed-off-by: John Garry <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Carlos Maiolino <[email protected]>
1 parent 82efde9 commit e7fb9b7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/dax.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1743,6 +1743,9 @@ dax_iomap_rw(struct kiocb *iocb, struct iov_iter *iter,
17431743
loff_t done = 0;
17441744
int ret;
17451745

1746+
if (WARN_ON_ONCE(iocb->ki_flags & IOCB_ATOMIC))
1747+
return -EIO;
1748+
17461749
if (!iomi.len)
17471750
return 0;
17481751

0 commit comments

Comments
 (0)