diff --git a/fs/io_uring.c b/fs/io_uring.c index 64faee19c82f83205afff2327d715c7c5b5c6678..50576b9403df96ab605ba2d8714266c9668c8069 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -4479,7 +4479,7 @@ static int io_req_needs_file(struct io_kiocb *req, int fd) { if (!io_op_defs[req->opcode].needs_file) return 0; - if (fd == -1 && io_op_defs[req->opcode].fd_non_neg) + if ((fd == -1 || fd == AT_FDCWD) && io_op_defs[req->opcode].fd_non_neg) return 0; return 1; }