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: avoid req->ctx reload in io_req_put_rsrc_nodes()

Cache 'ctx' to avoid it needing to get potentially reloaded.

Signed-off-by: Jens Axboe <axboe@kernel.dk>

+4 -2
+4 -2
io_uring/io_uring.c
··· 1073 1073 1074 1074 static inline void io_req_put_rsrc_nodes(struct io_kiocb *req) 1075 1075 { 1076 + struct io_ring_ctx *ctx = req->ctx; 1077 + 1076 1078 if (req->file_node) { 1077 - io_put_rsrc_node(req->ctx, req->file_node); 1079 + io_put_rsrc_node(ctx, req->file_node); 1078 1080 req->file_node = NULL; 1079 1081 } 1080 1082 if (req->flags & REQ_F_BUF_NODE) 1081 - io_put_rsrc_node(req->ctx, req->buf_node); 1083 + io_put_rsrc_node(ctx, req->buf_node); 1082 1084 } 1083 1085 1084 1086 static void io_free_batch_list(struct io_ring_ctx *ctx,