diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 78c677869308..ce4969d3e20d 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -1597,7 +1597,7 @@ int io_req_prep_async(struct io_kiocb *req) const struct io_op_def *def = &io_op_defs[req->opcode]; /* assign early for deferred execution for non-fixed file */ - if (def->needs_file && !(req->flags & REQ_F_FIXED_FILE)) + if (def->needs_file && !(req->flags & REQ_F_FIXED_FILE) && !req->file) req->file = io_file_get_normal(req, req->cqe.fd); if (!def->prep_async) return 0;