Re: [PATCH V3 2/2] io_uring: cancelable uring_cmd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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:


at the start of the body, both for safety but also to document this

Jens Axboe

[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux