public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Weihang Li <liweihang@huawei.com>
Cc: dledford@redhat.com, jgg@nvidia.com, linux-rdma@vger.kernel.org,
	linuxarm@huawei.com
Subject: Re: [PATCH for-next] RDMA/core: Flush workqueue before destroy it
Date: Tue, 6 Apr 2021 11:45:30 +0300	[thread overview]
Message-ID: <YGwfqiCRi4dq2F8r@unreal> (raw)
In-Reply-To: <1617698091-47439-1-git-send-email-liweihang@huawei.com>

On Tue, Apr 06, 2021 at 04:34:51PM +0800, Weihang Li wrote:
> From: Yixian Liu <liuyixian@huawei.com>
> 
> It is safer to flush the workqueue before destroying it.

Sorry, safer for what?

destroy_workqueue() flushes workqueue internally. There is no need to do
it twice.

Thanks

> 
> Signed-off-by: Yixian Liu <liuyixian@huawei.com>
> Signed-off-by: Weihang Li <liweihang@huawei.com>
> ---
>  drivers/infiniband/core/addr.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c
> index 0abce00..e58a06b 100644
> --- a/drivers/infiniband/core/addr.c
> +++ b/drivers/infiniband/core/addr.c
> @@ -883,6 +883,7 @@ int addr_init(void)
>  void addr_cleanup(void)
>  {
>  	unregister_netevent_notifier(&nb);
> +	flush_workqueue(addr_wq);
>  	destroy_workqueue(addr_wq);
>  	WARN_ON(!list_empty(&req_list));
>  }
> -- 
> 2.8.1
> 

  reply	other threads:[~2021-04-06  8:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06  8:34 [PATCH for-next] RDMA/core: Flush workqueue before destroy it Weihang Li
2021-04-06  8:45 ` Leon Romanovsky [this message]
2021-04-06 13:29   ` liweihang

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=YGwfqiCRi4dq2F8r@unreal \
    --to=leon@kernel.org \
    --cc=dledford@redhat.com \
    --cc=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=liweihang@huawei.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