summaryrefslogtreecommitdiff
path: root/io_uring/io_uring.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2023-07-07 20:14:40 +0300
committerJens Axboe <axboe@kernel.dk>2023-08-10 19:27:46 +0300
commit17bc28374cd06b7d2d3f1e88470ef89f9cd3a497 (patch)
treeec50652e492b813100116ec7a70c59ab2cd36fa7 /io_uring/io_uring.c
parent9f69a259576ad46e6a13812b2c272bc9a89f8e03 (diff)
downloadlinux-17bc28374cd06b7d2d3f1e88470ef89f9cd3a497.tar.xz
io_uring: have io_file_put() take an io_kiocb rather than the file
No functional changes in this patch, just a prep patch for needing the request in io_file_put(). Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/io_uring.c')
-rw-r--r--io_uring/io_uring.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index dadd745d389e..15697d88930d 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -998,8 +998,7 @@ static void __io_req_complete_post(struct io_kiocb *req, unsigned issue_flags)
io_put_kbuf_comp(req);
if (unlikely(req->flags & IO_REQ_CLEAN_FLAGS))
io_clean_op(req);
- if (!(req->flags & REQ_F_FIXED_FILE))
- io_put_file(req->file);
+ io_put_file(req);
rsrc_node = req->rsrc_node;
/*
@@ -1533,8 +1532,7 @@ void io_free_batch_list(struct io_ring_ctx *ctx, struct io_wq_work_node *node)
if (unlikely(req->flags & IO_REQ_CLEAN_FLAGS))
io_clean_op(req);
}
- if (!(req->flags & REQ_F_FIXED_FILE))
- io_put_file(req->file);
+ io_put_file(req);
io_req_put_rsrc_locked(req, ctx);