diff options
author | Jens Axboe <axboe@kernel.dk> | 2022-11-29 22:08:37 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-11-29 22:08:37 +0300 |
commit | b2cf789f6cb6d449f2b457ee3fb055b7f431481f (patch) | |
tree | 617b605a62024f37832e51f97ca4246ad86eb4cd /io_uring/rw.c | |
parent | b7b275e60bcd5f89771e865a8239325f86d9927d (diff) | |
parent | 5d772916855f593672de55c437925daccc8ecd73 (diff) | |
download | linux-b2cf789f6cb6d449f2b457ee3fb055b7f431481f.tar.xz |
Merge branch 'for-6.2/io_uring' into for-6.2/io_uring-next
* for-6.2/io_uring: (41 commits)
io_uring: keep unlock_post inlined in hot path
io_uring: don't use complete_post in kbuf
io_uring: spelling fix
io_uring: remove io_req_complete_post_tw
io_uring: allow multishot polled reqs to defer completion
io_uring: remove overflow param from io_post_aux_cqe
io_uring: add lockdep assertion in io_fill_cqe_aux
io_uring: make io_fill_cqe_aux static
io_uring: add io_aux_cqe which allows deferred completion
io_uring: allow defer completion for aux posted cqes
io_uring: defer all io_req_complete_failed
io_uring: always lock in io_apoll_task_func
io_uring: remove iopoll spinlock
io_uring: iopoll protect complete_post
io_uring: inline __io_req_complete_put()
io_uring: remove io_req_tw_post_queue
io_uring: use io_req_task_complete() in timeout
io_uring: hold locks for io_req_complete_failed
io_uring: add completion locking for iopoll
io_uring: kill io_cqring_ev_posted() and __io_cq_unlock_post()
...
Diffstat (limited to 'io_uring/rw.c')
-rw-r--r-- | io_uring/rw.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/io_uring/rw.c b/io_uring/rw.c index bb47cc4da713..1ce065709724 100644 --- a/io_uring/rw.c +++ b/io_uring/rw.c @@ -286,6 +286,12 @@ static inline int io_fixup_rw_res(struct io_kiocb *req, long res) static void io_req_rw_complete(struct io_kiocb *req, bool *locked) { io_req_io_end(req); + + if (req->flags & (REQ_F_BUFFER_SELECTED|REQ_F_BUFFER_RING)) { + unsigned issue_flags = *locked ? 0 : IO_URING_F_UNLOCKED; + + req->cqe.flags |= io_put_kbuf(req, issue_flags); + } io_req_task_complete(req, locked); } |