Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Maurizio Lombardi" <mlombard@bsdbackstore.eu>
To: "Tomas Henzl" <thenzl@redhat.com>,
	<linux-nvme@lists.infradead.org>, <sagi@grimberg.me>
Cc: <kbusch@kernel.org>
Subject: Re: [PATCH] nvmet-tcp: remove a redundant line in nvmet_tcp_release_queue_work
Date: Tue, 07 Oct 2025 08:26:48 +0200	[thread overview]
Message-ID: <DDBVK80QRT7V.2R17ZR0TPDAHO@bsdbackstore.eu> (raw)
In-Reply-To: <20251006175910.62721-1-thenzl@redhat.com>

On Mon Oct 6, 2025 at 7:59 PM CEST, Tomas Henzl wrote:
> cancel_work_sync(&queue->io_work) is called twice, remove the
> second instance.
>
> Signed-off-by: Tomas Henzl <thenzl@redhat.com>
> ---
>  drivers/nvme/target/tcp.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c
> index 470bf37e5a63..a1d0f6b18b2c 100644
> --- a/drivers/nvme/target/tcp.c
> +++ b/drivers/nvme/target/tcp.c
> @@ -1577,7 +1577,6 @@ static void nvmet_tcp_release_queue_work(struct work_struct *w)
>  	nvmet_tcp_uninit_data_in_cmds(queue);
>  	nvmet_sq_destroy(&queue->nvme_sq);
>  	nvmet_cq_put(&queue->nvme_cq);
> -	cancel_work_sync(&queue->io_work);
>  	nvmet_tcp_free_cmd_data_in_buffers(queue);
>  	/* ->sock will be released by fput() */
>  	fput(queue->sock->file);

I am not sure it's safe to remove it because io_work can potentially
re-enqueue itself.

The second call to cancel_work_sync(), after rcv_state is set to
NVMET_TCP_RECV_ERR, should ensure that no more "io_work"s are pending
on the workqueue.

Maurizio


  reply	other threads:[~2025-10-07  6:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-06 17:59 [PATCH] nvmet-tcp: remove a redundant line in nvmet_tcp_release_queue_work Tomas Henzl
2025-10-07  6:26 ` Maurizio Lombardi [this message]
2025-10-07  6:46   ` Maurizio Lombardi
2025-10-13 15:46     ` Tomas Henzl

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 \
    --in-reply-to=DDBVK80QRT7V.2R17ZR0TPDAHO@bsdbackstore.eu \
    --to=mlombard@bsdbackstore.eu \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=thenzl@redhat.com \
    /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