From: Hao Xu <howeyxu@xxxxxxxxxxx> __io_req_complete_put() is called by __io_req_complete_post, and before that we already put kbuf, no need to do that in __io_req_complete_put() again. Signed-off-by: Hao Xu <howeyxu@xxxxxxxxxxx> --- io_uring/io_uring.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 1572ebe3cff1..a94ddd0ba507 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -1245,12 +1245,6 @@ static void __io_req_complete_put(struct io_kiocb *req) } } io_req_put_rsrc(req); - /* - * Selected buffer deallocation in io_clean_op() assumes that - * we don't hold ->completion_lock. Clean them here to avoid - * deadlocks. - */ - io_put_kbuf_comp(req); io_dismantle_req(req); io_put_task(req->task, 1); wq_list_add_head(&req->comp_list, &ctx->locked_free_list); -- 2.25.1