[PATCH] scsi:fnic: remove unneeded flush_workqueue

cgel.zte@gmail.com posted 1 patch 4 years ago
drivers/scsi/fnic/fnic_main.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
[PATCH] scsi:fnic: remove unneeded flush_workqueue
Posted by cgel.zte@gmail.com 4 years ago
From: ran jianping <ran.jianping@zte.com.cn>

All work currently pending will be done first by calling destroy_workqueue,
so there is no need to flush it explicitly.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ran jianping <ran.jianping@zte.com.cn>
---
 drivers/scsi/fnic/fnic_main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c
index 9161bd2fd421..460e03a55096 100644
--- a/drivers/scsi/fnic/fnic_main.c
+++ b/drivers/scsi/fnic/fnic_main.c
@@ -1146,10 +1146,8 @@ static void __exit fnic_cleanup_module(void)
 {
 	pci_unregister_driver(&fnic_driver);
 	destroy_workqueue(fnic_event_queue);
-	if (fnic_fip_queue) {
-		flush_workqueue(fnic_fip_queue);
+	if (fnic_fip_queue)
 		destroy_workqueue(fnic_fip_queue);
-	}
 	kmem_cache_destroy(fnic_sgl_cache[FNIC_SGL_CACHE_MAX]);
 	kmem_cache_destroy(fnic_sgl_cache[FNIC_SGL_CACHE_DFLT]);
 	kmem_cache_destroy(fnic_io_req_cache);
-- 
2.25.1
Re: [PATCH] scsi:fnic: remove unneeded flush_workqueue
Posted by Martin K. Petersen 4 years ago
On Sun, 24 Apr 2022 06:54:06 +0000, cgel.zte@gmail.com wrote:

> From: ran jianping <ran.jianping@zte.com.cn>
> 
> All work currently pending will be done first by calling destroy_workqueue,
> so there is no need to flush it explicitly.
> 
> 

Applied to 5.19/scsi-queue, thanks!

[1/1] scsi:fnic: remove unneeded flush_workqueue
      https://git.kernel.org/mkp/scsi/c/671a52f2aeaf

-- 
Martin K. Petersen	Oracle Linux Engineering