History

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.

Jens Axboe committed 6 years ago

Commit efa84801 parent 51a4cc11 file · +1 −1Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/fs.h+1−1
@@ -3293,7 +3293,7 @@ static inline int kiocb_set_rw_flags(struct kiocb *ki, rwf_t flags) · 3292 unmodified lines
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;