aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2020-04-28 13:16:53 -0600
committerJens Axboe <axboe@kernel.dk>2020-04-30 22:24:27 -0600
commit490e89676a523c688343d6cb8ca5f5dc476414df (patch)
tree0b5954fa5881a59c03ee2a9528341dab41c35c87
parentaf197f50ac53fff1241598c73ca606754a3bb808 (diff)
downloadlinux-yocto-490e89676a523c688343d6cb8ca5f5dc476414df.tar.gz
linux-yocto-490e89676a523c688343d6cb8ca5f5dc476414df.tar.bz2
linux-yocto-490e89676a523c688343d6cb8ca5f5dc476414df.zip
io_uring: only force async punt if poll based retry can't handle it
We do blocking retry from our poll handler, if the file supports polled notifications. Only mark the request as needing an async worker if we can't poll for it. Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--fs/io_uring.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 516a59db73ca..b536c34c6c36 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -2604,7 +2604,8 @@ copy_iov:
if (ret)
goto out_free;
/* any defer here is final, must blocking retry */
- if (!(req->flags & REQ_F_NOWAIT))
+ if (!(req->flags & REQ_F_NOWAIT) &&
+ !file_can_poll(req->file))
req->flags |= REQ_F_MUST_PUNT;
return -EAGAIN;
}
@@ -2726,7 +2727,8 @@ copy_iov:
if (ret)
goto out_free;
/* any defer here is final, must blocking retry */
- req->flags |= REQ_F_MUST_PUNT;
+ if (!file_can_poll(req->file))
+ req->flags |= REQ_F_MUST_PUNT;
return -EAGAIN;
}
}