diff --git a/fs/io_uring.c b/fs/io_uring.c index 3de7237e23f5449a67697fc138c9cffda5ec2d38..7fdb854a02cf39e864913c8c2fb5a2f04f259c52 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -5031,7 +5031,7 @@ static int io_req_defer(struct io_kiocb *req, const struct io_uring_sqe *sqe) int ret; /* Still need defer if there is pending req in defer list. */ - if (!req_need_defer(req) && list_empty(&ctx->defer_list)) + if (!req_need_defer(req) && list_empty_careful(&ctx->defer_list)) return 0; if (!req->io && io_alloc_async_ctx(req))