diff options
Diffstat (limited to 'io_uring/io_uring.h')
-rw-r--r-- | io_uring/io_uring.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/io_uring/io_uring.h b/io_uring/io_uring.h index 12769bad5cee..ff153af28236 100644 --- a/io_uring/io_uring.h +++ b/io_uring/io_uring.h @@ -196,10 +196,10 @@ static inline bool req_has_async_data(struct io_kiocb *req) return req->flags & REQ_F_ASYNC_DATA; } -static inline void io_put_file(struct file *file) +static inline void io_put_file(struct io_kiocb *req) { - if (file) - fput(file); + if (!(req->flags & REQ_F_FIXED_FILE) && req->file) + fput(req->file); } static inline void io_ring_submit_unlock(struct io_ring_ctx *ctx, |