On 9/22/23 10:09 AM, Ming Lei wrote: > diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c > index 783ed0fff71b..1e3de74c2ba3 100644 > --- a/io_uring/io_uring.c > +++ b/io_uring/io_uring.c > @@ -3256,6 +3256,39 @@ static __cold bool io_uring_try_cancel_iowq(struct io_ring_ctx *ctx) > return ret; > } > > +static bool io_uring_try_cancel_uring_cmd(struct io_ring_ctx *ctx, > + struct task_struct *task, bool cancel_all) > + __acquires(ctx->uring_lock) > +{ Minor nit - I don't think the static checker will be happy with this, as we're now called with it held already. Might not be a bad idea to add a: lockdep_assert_held(&ctx->uring_lock); at the start of the body, both for safety but also to document this requirement. -- Jens Axboe