OSDN Git Service

fs: RWF_NOWAIT should imply IOCB_NOIO
authorJens Axboe <axboe@kernel.dk>
Tue, 11 Aug 2020 00:44:24 +0000 (18:44 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 11 Aug 2020 14:09:01 +0000 (08:09 -0600)
commitefa8480a831673bb52400df9dbe5da0aacda97bf
treeef35b265ada3875915696ee6b3112d5f688ed708
parent51a4cc112c7a42b62a91bcccdfac42e7c4561729
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>
include/linux/fs.h