public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Ming Lei <[email protected]>,
	[email protected], [email protected]
Cc: Gabriel Krisman Bertazi <[email protected]>
Subject: Re: [PATCH V3 2/2] io_uring: cancelable uring_cmd
Date: Fri, 22 Sep 2023 10:28:07 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

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


      reply	other threads:[~2023-09-22 16:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-22 16:09 [PATCH V3 0/2] io_uring: cancelable uring_cmd Ming Lei
2023-09-22 16:09 ` [PATCH V3 1/2] io_uring: retain top 8bits of uring_cmd flags for kernel internal use Ming Lei
2023-09-22 16:29   ` Jens Axboe
2023-09-22 16:09 ` [PATCH V3 2/2] io_uring: cancelable uring_cmd Ming Lei
2023-09-22 16:28   ` Jens Axboe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox