summaryrefslogtreecommitdiff
path: root/io_uring/poll.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2022-11-30 15:21:53 +0000
committerJens Axboe <axboe@kernel.dk>2022-11-30 10:26:57 -0700
commit047b6aef0966f9863e1940b57c256ebbb465a6b5 (patch)
tree0509a08b4cab1a07951e5756ba5836e8e7ba61c7 /io_uring/poll.c
parent9805fa2d94993e16efd0e1adbd2b54d8d1fe2f9f (diff)
io_uring: remove ctx variable in io_poll_check_events
ctx is only used by io_poll_check_events() for multishot poll CQE posting, don't save it on stack in advance. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/552c1771f8a0e7688afdb4f538ead245f53e80e7.1669821213.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/poll.c')
-rw-r--r--io_uring/poll.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/io_uring/poll.c b/io_uring/poll.c
index 8987e13d302e..ada0017e3d88 100644
--- a/io_uring/poll.c
+++ b/io_uring/poll.c
@@ -237,7 +237,6 @@ enum {
*/
static int io_poll_check_events(struct io_kiocb *req, bool *locked)
{
- struct io_ring_ctx *ctx = req->ctx;
int v, ret;
/* req->task == current here, checking PF_EXITING is safe */
@@ -289,7 +288,7 @@ static int io_poll_check_events(struct io_kiocb *req, bool *locked)
__poll_t mask = mangle_poll(req->cqe.res &
req->apoll_events);
- if (!io_aux_cqe(ctx, *locked, req->cqe.user_data,
+ if (!io_aux_cqe(req->ctx, *locked, req->cqe.user_data,
mask, IORING_CQE_F_MORE, false)) {
io_req_set_res(req, mask, 0);
return IOU_POLL_REMOVE_POLL_USE_RES;