Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH 1/3] nvmet-rdma: removed queues cleanup from module exit
Date: Wed, 8 Nov 2017 19:21:17 +0100	[thread overview]
Message-ID: <20171108182117.GB512@lst.de> (raw)
In-Reply-To: <20171108100030.25745-2-sagi@grimberg.me>

On Wed, Nov 08, 2017@12:00:28PM +0200, Sagi Grimberg wrote:
> We already do that when we are notified in device removal
> which is triggered when unregistering as an ib client.
> 
> Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
> ---
>  drivers/nvme/target/rdma.c | 17 -----------------
>  1 file changed, 17 deletions(-)
> 
> diff --git a/drivers/nvme/target/rdma.c b/drivers/nvme/target/rdma.c
> index 98d7f2ded511..efcdc4991359 100644
> --- a/drivers/nvme/target/rdma.c
> +++ b/drivers/nvme/target/rdma.c
> @@ -1537,24 +1537,7 @@ static int __init nvmet_rdma_init(void)
>  
>  static void __exit nvmet_rdma_exit(void)
>  {
> -	struct nvmet_rdma_queue *queue;
> -
>  	nvmet_unregister_transport(&nvmet_rdma_ops);
> -
> -	flush_scheduled_work();
> -
> -	mutex_lock(&nvmet_rdma_queue_mutex);
> -	while ((queue = list_first_entry_or_null(&nvmet_rdma_queue_list,
> -			struct nvmet_rdma_queue, queue_list))) {
> -		list_del_init(&queue->queue_list);
> -
> -		mutex_unlock(&nvmet_rdma_queue_mutex);
> -		__nvmet_rdma_queue_disconnect(queue);
> -		mutex_lock(&nvmet_rdma_queue_mutex);
> -	}
> -	mutex_unlock(&nvmet_rdma_queue_mutex);
> -
> -	flush_scheduled_work();

Should we thrown in an assert here that the queue really is empty?

Otherwise this looks good to me:

Reviewed-by: Christoph Hellwig <hch at lst.de>

  reply	other threads:[~2017-11-08 18:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-08 10:00 [PATCH 0/3] few small nvmet fixes/cleanups Sagi Grimberg
2017-11-08 10:00 ` [PATCH 1/3] nvmet-rdma: removed queues cleanup from module exit Sagi Grimberg
2017-11-08 18:21   ` Christoph Hellwig [this message]
2017-11-08 10:00 ` [PATCH 2/3] nvmet: remove redundant memset if failed to get_smart_log failed Sagi Grimberg
2017-11-08 18:21   ` Christoph Hellwig
2017-11-09  9:41   ` Christoph Hellwig
2017-11-08 10:00 ` [PATCH 3/3] nvmet: remove redundant local variable Sagi Grimberg
2017-11-08 18:21   ` Christoph Hellwig

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=20171108182117.GB512@lst.de \
    --to=hch@lst.de \
    /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