Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io_uring/notif: remove ctx var from io_notif_tw_complete

We don't need ctx in the hottest path, i.e. registered buffers,
let's get it only when we need it.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/e7345e268ffaeaf79b4c8f3a5d019d6a87a3d1f1.1713185320.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Pavel Begunkov and committed by
Jens Axboe
2e730d8d 7e58d0af

+2 -3
+2 -3
io_uring/notif.c
··· 12 12 void io_notif_tw_complete(struct io_kiocb *notif, struct io_tw_state *ts) 13 13 { 14 14 struct io_notif_data *nd = io_notif_to_data(notif); 15 - struct io_ring_ctx *ctx = notif->ctx; 16 15 17 16 if (unlikely(nd->zc_report) && (nd->zc_copied || !nd->zc_used)) 18 17 notif->cqe.res |= IORING_NOTIF_USAGE_ZC_COPIED; 19 18 20 - if (nd->account_pages && ctx->user) { 21 - __io_unaccount_mem(ctx->user, nd->account_pages); 19 + if (nd->account_pages && notif->ctx->user) { 20 + __io_unaccount_mem(notif->ctx->user, nd->account_pages); 22 21 nd->account_pages = 0; 23 22 } 24 23 io_req_task_complete(notif, ts);