Commit 41a5169c authored by Hao Xu's avatar Hao Xu Committed by Jens Axboe

io_uring: code clean for completion_lock in io_arm_poll_handler()

We can merge two spin_unlock() operations to one since we removed some
code not long ago.
Signed-off-by: default avatarHao Xu <haoxu@linux.alibaba.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent f552a27a
...@@ -5237,13 +5237,10 @@ static int io_arm_poll_handler(struct io_kiocb *req) ...@@ -5237,13 +5237,10 @@ static int io_arm_poll_handler(struct io_kiocb *req)
ret = __io_arm_poll_handler(req, &apoll->poll, &ipt, mask, ret = __io_arm_poll_handler(req, &apoll->poll, &ipt, mask,
io_async_wake); io_async_wake);
if (ret || ipt.error) {
spin_unlock(&ctx->completion_lock);
if (ret)
return IO_APOLL_READY;
return IO_APOLL_ABORTED;
}
spin_unlock(&ctx->completion_lock); spin_unlock(&ctx->completion_lock);
if (ret || ipt.error)
return ret ? IO_APOLL_READY : IO_APOLL_ABORTED;
trace_io_uring_poll_arm(ctx, req, req->opcode, req->user_data, trace_io_uring_poll_arm(ctx, req, req->opcode, req->user_data,
mask, apoll->poll.events); mask, apoll->poll.events);
return IO_APOLL_OK; return IO_APOLL_OK;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment