diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2020-06-21 13:09:50 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-06-21 20:46:03 -0600 |
commit | 62ef73165091476d31f31e33d9d0d48b088c129d (patch) | |
tree | f26a29117c19fa32ff615d60060b66f816b6cdce /fs/io_uring.c | |
parent | 895aa7b1a0cc42de985b310478688138719bc293 (diff) | |
download | lwn-62ef73165091476d31f31e33d9d0d48b088c129d.tar.gz lwn-62ef73165091476d31f31e33d9d0d48b088c129d.zip |
io_uring: remove setting REQ_F_MUST_PUNT in rw
io_{read,write}() {
...
copy_iov: // prep async
if (!(flags & REQ_F_NOWAIT) && !file_can_poll(file))
flags |= REQ_F_MUST_PUNT;
}
REQ_F_MUST_PUNT there is pointless, because if it happens then
REQ_F_NOWAIT is known to be _not_ set, and the request will go
async path in __io_queue_sqe() anyway. file_can_poll() check
is also repeated in arm_poll*(), so don't need it.
Remove the mentioned assignment REQ_F_MUST_PUNT in preparation
for killing the flag.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r-- | fs/io_uring.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 5d1685e206c1..13f72d2a3fec 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2920,10 +2920,6 @@ copy_iov: inline_vecs, &iter); if (ret) goto out_free; - /* any defer here is final, must blocking retry */ - if (!(req->flags & REQ_F_NOWAIT) && - !file_can_poll(req->file)) - req->flags |= REQ_F_MUST_PUNT; /* if we can retry, do so with the callbacks armed */ if (io_rw_should_retry(req)) { ret2 = io_iter_do_read(req, &iter); @@ -3057,10 +3053,6 @@ copy_iov: inline_vecs, &iter); if (ret) goto out_free; - /* any defer here is final, must blocking retry */ - if (!(req->flags & REQ_F_NOWAIT) && - !file_can_poll(req->file)) - req->flags |= REQ_F_MUST_PUNT; return -EAGAIN; } } |