diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2020-07-03 22:15:08 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-07-05 15:07:50 -0600 |
commit | 8b3656af2a37dc538d21e144a5a94bacae05e9f1 (patch) | |
tree | fab0c184b95db11d4fc0ae9d69844efeca62e947 /fs/io_uring.c | |
parent | 652532ad459524d32c6bf1522e0b88d83b084d1a (diff) | |
download | lwn-8b3656af2a37dc538d21e144a5a94bacae05e9f1.tar.gz lwn-8b3656af2a37dc538d21e144a5a94bacae05e9f1.zip |
io_uring: fix lost cqe->flags
Don't forget to fill cqe->flags properly in io_submit_flush_completions()
Fixes: a1d7c393c4711 ("io_uring: enable READ/WRITE to use deferred completions")
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 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 7147e87a24b5..9464f9470bbc 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -1416,7 +1416,7 @@ static void io_submit_flush_completions(struct io_comp_state *cs) req = list_first_entry(&cs->list, struct io_kiocb, list); list_del(&req->list); - io_cqring_fill_event(req, req->result); + __io_cqring_fill_event(req, req->result, req->cflags); if (!(req->flags & REQ_F_LINK_HEAD)) { req->flags |= REQ_F_COMP_LOCKED; io_put_req(req); @@ -1441,6 +1441,7 @@ static void __io_req_complete(struct io_kiocb *req, long res, unsigned cflags, io_put_req(req); } else { req->result = res; + req->cflags = cflags; list_add_tail(&req->list, &cs->list); if (++cs->nr >= 32) io_submit_flush_completions(cs); |