[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <158860769737.32485.3674517821826063792.stgit@buzz>
Date: Mon, 04 May 2020 18:54:57 +0300
From: Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
To: linux-kernel@...r.kernel.org, linux-block@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>, Christoph Hellwig <hch@...radead.org>
Subject: [PATCH RFC 2/2] fs/direct-io: pass NOWAIT to also for read requests
For some reason NOWAIT currently is passed only for writes.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
Fixes: 03a07c92a9ed ("block: return on congested block device")
---
fs/direct-io.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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;
Powered by blists - more mailing lists