This is required to avoid waiting in lower layers.

Signed-off-by: Konstantin Khlebnikov <khlebni...@yandex-team.ru>
---
 fs/iomap/direct-io.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
index 20dde5aadcdd..9b53fa7651e3 100644
--- a/fs/iomap/direct-io.c
+++ b/fs/iomap/direct-io.c
@@ -63,6 +63,8 @@ static void iomap_dio_submit_bio(struct iomap_dio *dio, 
struct iomap *iomap,
 {
        atomic_inc(&dio->ref);
 
+       if (dio->iocb->ki_flags & IOCB_NOWAIT)
+               bio->bi_opf |= REQ_NOWAIT;
        if (dio->iocb->ki_flags & IOCB_HIPRI)
                bio_set_polled(bio, dio->iocb);
 

Reply via email to