Message ID | 158860769737.32485.3674517821826063792.stgit@buzz (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [RFC,1/2] fs/iomap/direct-io: pass NOWAIT to bio flags | expand |
On Mon, May 04, 2020 at 06:54:57PM +0300, Konstantin Khlebnikov wrote: > For some reason NOWAIT currently is passed only for writes. > > Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> > Fixes: 03a07c92a9ed ("block: return on congested block device") Looks good, Reviewed-by: Christoph Hellwig <hch@lst.de>
diff --git a/fs/direct-io.c b/fs/direct-io.c index 00b4d15bb811..dbb6afef6be9 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -1234,11 +1234,11 @@ do_blockdev_direct_IO(struct kiocb *iocb, struct inode *inode, if (iov_iter_rw(iter) == WRITE) { dio->op = REQ_OP_WRITE; dio->op_flags = REQ_SYNC | REQ_IDLE; - if (iocb->ki_flags & IOCB_NOWAIT) - dio->op_flags |= REQ_NOWAIT; } else { dio->op = REQ_OP_READ; } + if (iocb->ki_flags & IOCB_NOWAIT) + dio->op_flags |= REQ_NOWAIT; if (iocb->ki_flags & IOCB_HIPRI) dio->op_flags |= REQ_HIPRI;
For some reason NOWAIT currently is passed only for writes. Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> Fixes: 03a07c92a9ed ("block: return on congested block device") --- fs/direct-io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)