Skip to content

Commit efa8480

Browse files
committed
fs: RWF_NOWAIT should imply IOCB_NOIO
With the change allowing read-ahead for IOCB_NOWAIT, we changed the RWF_NOWAIT semantics of only doing cached reads. Since we know have IOCB_NOIO to manage that specific side of it, just make RWF_NOWAIT imply IOCB_NOIO as well to restore the previous behavior. Fixes: 2e85abf ("mm: allow read-ahead with IOCB_NOWAIT set") Reported-by: Dave Chinner <[email protected]> Reviewed-by: Dave Chinner <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 51a4cc1 commit efa8480

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/fs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3293,7 +3293,7 @@ static inline int kiocb_set_rw_flags(struct kiocb *ki, rwf_t flags)
32933293
if (flags & RWF_NOWAIT) {
32943294
if (!(ki->ki_filp->f_mode & FMODE_NOWAIT))
32953295
return -EOPNOTSUPP;
3296-
kiocb_flags |= IOCB_NOWAIT;
3296+
kiocb_flags |= IOCB_NOWAIT | IOCB_NOIO;
32973297
}
32983298
if (flags & RWF_HIPRI)
32993299
kiocb_flags |= IOCB_HIPRI;

0 commit comments

Comments
 (0)