projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f552a27
)
io_uring: code clean for completion_lock in io_arm_poll_handler()
author
Hao Xu
<haoxu@linux.alibaba.com>
Thu, 12 Aug 2021 07:47:02 +0000
(15:47 +0800)
committer
Jens Axboe
<axboe@kernel.dk>
Mon, 23 Aug 2021 19:10:37 +0000
(13:10 -0600)
We can merge two spin_unlock() operations to one since we removed some
code not long ago.
Signed-off-by: Hao Xu <haoxu@linux.alibaba.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index 7626cad93f60447b3de95c45428af846ba2f1ce4..c581c7cbb8b2c7e596628e6ccca553d162d730f9 100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-5237,13
+5237,10
@@
static int io_arm_poll_handler(struct io_kiocb *req)
ret = __io_arm_poll_handler(req, &apoll->poll, &ipt, mask,
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);
+ if (ret || ipt.error)
+ return ret ? IO_APOLL_READY : IO_APOLL_ABORTED;
+
trace_io_uring_poll_arm(ctx, req, req->opcode, req->user_data,
mask, apoll->poll.events);
return IO_APOLL_OK;