public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Pavel Begunkov <[email protected]>,
	Ming Lei <[email protected]>,
	[email protected]
Subject: Re: [PATCH] io_uring: kill dead code in io_req_complete_post
Date: Tue, 2 Apr 2024 13:59:18 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 4/2/24 12:40 PM, Pavel Begunkov wrote:
> On 3/29/24 15:47, Ming Lei wrote:
>> Since commit 8f6c829491fe ("io_uring: remove struct io_tw_state::locked"),
>> io_req_complete_post() is only called from io-wq submit work, where the
>> request reference is guaranteed to be grabbed and won't drop to zero
>> in io_req_complete_post().
>>
>> Kill the dead code, meantime add req_ref_put() to put the reference.
> 
> Interesting... a nice clean up. The assumption is too implicit to
> my taste, but should be just fine if we add
> 
> if (WARN_ON_ONCE(!(issue_flags & IO_URING_F_IOWQ)))
>     return;

And include a comment as to why that is there as well.

-- 
Jens Axboe


      reply	other threads:[~2024-04-02 19:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-29 15:47 [PATCH] io_uring: kill dead code in io_req_complete_post Ming Lei
2024-04-02 18:40 ` Pavel Begunkov
2024-04-02 19:59   ` 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] \
    /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