Skip to content

Commit 160d6ec

Browse files
Chen Nimartinkpetersen
authored andcommitted
scsi: fnic: Remove redundant flush_workqueue() calls
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Karan Tilak Kumar <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent e402ee0 commit 160d6ec

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/scsi/fnic/fnic_main.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,10 +1365,9 @@ static void __exit fnic_cleanup_module(void)
13651365
if (pc_rscn_handling_feature_flag == PC_RSCN_HANDLING_FEATURE_ON)
13661366
destroy_workqueue(reset_fnic_work_queue);
13671367

1368-
if (fnic_fip_queue) {
1369-
flush_workqueue(fnic_fip_queue);
1368+
if (fnic_fip_queue)
13701369
destroy_workqueue(fnic_fip_queue);
1371-
}
1370+
13721371
kmem_cache_destroy(fnic_sgl_cache[FNIC_SGL_CACHE_MAX]);
13731372
kmem_cache_destroy(fnic_sgl_cache[FNIC_SGL_CACHE_DFLT]);
13741373
kmem_cache_destroy(fnic_io_req_cache);

0 commit comments

Comments
 (0)