public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Nilay Shroff <nilay@linux.ibm.com>
To: John Garry <john.g.garry@oracle.com>, hch@lst.de, kbusch@kernel.org
Cc: linux-nvme@lists.infradead.org
Subject: Re: [PATCH] nvme-multipath: put module reference when delayed removal work is canceled
Date: Wed, 15 Apr 2026 21:51:34 +0530	[thread overview]
Message-ID: <a9b04231-9a71-4108-867e-705f7b39cf65@linux.ibm.com> (raw)
In-Reply-To: <20260415155358.1517871-1-john.g.garry@oracle.com>

On 4/15/26 9:23 PM, John Garry wrote:
> The delayed disk removal work is canceled when a NS (re)appears. However,
> we do not put the module reference grabbed in nvme_mpath_remove_disk(), so
> fix that.
> 
> Signed-off-by: John Garry <john.g.garry@oracle.com>
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 0d623476e36f8..fead3b7cd4bea 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -4083,7 +4083,8 @@ static int nvme_init_ns_head(struct nvme_ns *ns, struct nvme_ns_info *info)
>   	mutex_unlock(&ctrl->subsys->lock);
>   
>   #ifdef CONFIG_NVME_MULTIPATH
> -	cancel_delayed_work(&head->remove_work);
> +	if (cancel_delayed_work(&head->remove_work))
> +		module_put(THIS_MODULE);
>   #endif
>   	return 0;
>   

Looks good to me:
Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>


  reply	other threads:[~2026-04-15 16:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-15 15:53 [PATCH] nvme-multipath: put module reference when delayed removal work is canceled John Garry
2026-04-15 16:21 ` Nilay Shroff [this message]
2026-04-15 17:53 ` Chaitanya Kulkarni
2026-04-16  5:14 ` Christoph Hellwig
2026-04-16 22:08 ` Keith Busch

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=a9b04231-9a71-4108-867e-705f7b39cf65@linux.ibm.com \
    --to=nilay@linux.ibm.com \
    --cc=hch@lst.de \
    --cc=john.g.garry@oracle.com \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    /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