Skip to content

Commit 14cfbb7

Browse files
Hao Xuaxboe
authored andcommitted
io_uring: fix wrong condition to grab uring lock
Grab uring lock when we are in io-worker rather than in the original or system-wq context since we already hold it in these two situation. Signed-off-by: Hao Xu <[email protected]> Fixes: b66ceaf ("io_uring: move iopoll reissue into regular IO path") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 3f00838 commit 14cfbb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/io_uring.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2949,7 +2949,7 @@ static void kiocb_done(struct kiocb *kiocb, ssize_t ret,
29492949
struct io_ring_ctx *ctx = req->ctx;
29502950

29512951
req_set_fail(req);
2952-
if (issue_flags & IO_URING_F_NONBLOCK) {
2952+
if (!(issue_flags & IO_URING_F_NONBLOCK)) {
29532953
mutex_lock(&ctx->uring_lock);
29542954
__io_req_complete(req, issue_flags, ret, cflags);
29552955
mutex_unlock(&ctx->uring_lock);

0 commit comments

Comments
 (0)