* [PATCH] nvmet: pci-epf: Remove redundant 'flush_workqueue()' calls
@ 2025-03-12 8:56 Chen Ni
2025-03-12 13:57 ` Christoph Hellwig
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Chen Ni @ 2025-03-12 8:56 UTC (permalink / raw)
To: hch, sagi, kch, linux-nvme, linux-kernel; +Cc: Chen Ni
'destroy_workqueue()' already drains the queue before destroying it, so
there is no need to flush it explicitly.
Remove the redundant 'flush_workqueue()' calls.
This was generated with coccinelle:
@@
expression E;
@@
- flush_workqueue(E);
destroy_workqueue(E);
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
drivers/nvme/target/pci-epf.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/nvme/target/pci-epf.c b/drivers/nvme/target/pci-epf.c
index 565d2bd36dcd..82956c207b42 100644
--- a/drivers/nvme/target/pci-epf.c
+++ b/drivers/nvme/target/pci-epf.c
@@ -1385,7 +1385,6 @@ static u16 nvmet_pci_epf_delete_sq(struct nvmet_ctrl *tctrl, u16 sqid)
if (!test_and_clear_bit(NVMET_PCI_EPF_Q_LIVE, &sq->flags))
return NVME_SC_QID_INVALID | NVME_STATUS_DNR;
- flush_workqueue(sq->iod_wq);
destroy_workqueue(sq->iod_wq);
sq->iod_wq = NULL;
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] nvmet: pci-epf: Remove redundant 'flush_workqueue()' calls
2025-03-12 8:56 [PATCH] nvmet: pci-epf: Remove redundant 'flush_workqueue()' calls Chen Ni
@ 2025-03-12 13:57 ` Christoph Hellwig
2025-03-12 17:43 ` Chaitanya Kulkarni
2025-03-12 17:57 ` Keith Busch
2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2025-03-12 13:57 UTC (permalink / raw)
To: Chen Ni; +Cc: sagi, kch, linux-nvme, linux-kernel
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] nvmet: pci-epf: Remove redundant 'flush_workqueue()' calls
2025-03-12 8:56 [PATCH] nvmet: pci-epf: Remove redundant 'flush_workqueue()' calls Chen Ni
2025-03-12 13:57 ` Christoph Hellwig
@ 2025-03-12 17:43 ` Chaitanya Kulkarni
2025-03-12 17:57 ` Keith Busch
2 siblings, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2025-03-12 17:43 UTC (permalink / raw)
To: Chen Ni, hch@lst.de, sagi@grimberg.me, Chaitanya Kulkarni,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org
On 3/12/25 01:56, Chen Ni wrote:
> 'destroy_workqueue()' already drains the queue before destroying it, so
> there is no need to flush it explicitly.
>
> Remove the redundant 'flush_workqueue()' calls.
>
> This was generated with coccinelle:
>
> @@
> expression E;
> @@
> - flush_workqueue(E);
> destroy_workqueue(E);
>
> Signed-off-by: Chen Ni<nichen@iscas.ac.cn>
Looks good.
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] nvmet: pci-epf: Remove redundant 'flush_workqueue()' calls
2025-03-12 8:56 [PATCH] nvmet: pci-epf: Remove redundant 'flush_workqueue()' calls Chen Ni
2025-03-12 13:57 ` Christoph Hellwig
2025-03-12 17:43 ` Chaitanya Kulkarni
@ 2025-03-12 17:57 ` Keith Busch
2 siblings, 0 replies; 4+ messages in thread
From: Keith Busch @ 2025-03-12 17:57 UTC (permalink / raw)
To: Chen Ni; +Cc: hch, sagi, kch, linux-nvme, linux-kernel
On Wed, Mar 12, 2025 at 04:56:25PM +0800, Chen Ni wrote:
> 'destroy_workqueue()' already drains the queue before destroying it, so
> there is no need to flush it explicitly.
>
> Remove the redundant 'flush_workqueue()' calls.
Thanks, applied to nvme-6.15.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-03-12 17:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-12 8:56 [PATCH] nvmet: pci-epf: Remove redundant 'flush_workqueue()' calls Chen Ni
2025-03-12 13:57 ` Christoph Hellwig
2025-03-12 17:43 ` Chaitanya Kulkarni
2025-03-12 17:57 ` Keith Busch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox