diff options
author | Jens Axboe <axboe@kernel.dk> | 2020-08-10 18:44:24 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-08-11 08:09:01 -0600 |
commit | efa8480a831673bb52400df9dbe5da0aacda97bf (patch) | |
tree | ef35b265ada3875915696ee6b3112d5f688ed708 /include | |
parent | 51a4cc112c7a42b62a91bcccdfac42e7c4561729 (diff) | |
download | linux-stable-efa8480a831673bb52400df9dbe5da0aacda97bf.tar.gz linux-stable-efa8480a831673bb52400df9dbe5da0aacda97bf.tar.bz2 linux-stable-efa8480a831673bb52400df9dbe5da0aacda97bf.zip |
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: 2e85abf053b9 ("mm: allow read-ahead with IOCB_NOWAIT set")
Reported-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index bd7ec3eaeed0..f1cca4bfdd7b 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -3293,7 +3293,7 @@ static inline int kiocb_set_rw_flags(struct kiocb *ki, rwf_t flags) if (flags & RWF_NOWAIT) { if (!(ki->ki_filp->f_mode & FMODE_NOWAIT)) return -EOPNOTSUPP; - kiocb_flags |= IOCB_NOWAIT; + kiocb_flags |= IOCB_NOWAIT | IOCB_NOIO; } if (flags & RWF_HIPRI) kiocb_flags |= IOCB_HIPRI; |