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.
Unified · Split
| @@ -3293,7 +3293,7 @@ static inline int kiocb_set_rw_flags(struct kiocb *ki, rwf_t flags) · 3292 unmodified lines | ||
| 3293 | 3293 | if (flags & RWF_NOWAIT) { |
| 3294 | 3294 | if (!(ki->ki_filp->f_mode & FMODE_NOWAIT)) |
| 3295 | 3295 | return -EOPNOTSUPP; |
| 3296 | − kiocb_flags |= IOCB_NOWAIT; | |
| 3296 | + kiocb_flags |= IOCB_NOWAIT | IOCB_NOIO; | |
| 3297 | 3297 | } |
| 3298 | 3298 | if (flags & RWF_HIPRI) |
| 3299 | 3299 | kiocb_flags |= IOCB_HIPRI; |