Skip to content

Commit 13a21aa

Browse files
author
Karan Kumar
committed
scsi: fnic: Remove redundant flush_workqueue() calls
JIRA: https://issues.redhat.com/browse/RHEL-64440 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> Link: https://lore.kernel.org/r/20250312074320.1430175-1-nichen@iscas.ac.cn Reviewed-by: Karan Tilak Kumar <kartilak@cisco.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> (cherry picked from commit 160d6ec) Signed-off-by: Karan Kumar <karkumar@redhat.com>
1 parent ab6c18a commit 13a21aa

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
@@ -1377,10 +1377,9 @@ static void __exit fnic_cleanup_module(void)
13771377
if (pc_rscn_handling_feature_flag == PC_RSCN_HANDLING_FEATURE_ON)
13781378
destroy_workqueue(reset_fnic_work_queue);
13791379

1380-
if (fnic_fip_queue) {
1381-
flush_workqueue(fnic_fip_queue);
1380+
if (fnic_fip_queue)
13821381
destroy_workqueue(fnic_fip_queue);
1383-
}
1382+
13841383
kmem_cache_destroy(fnic_sgl_cache[FNIC_SGL_CACHE_MAX]);
13851384
kmem_cache_destroy(fnic_sgl_cache[FNIC_SGL_CACHE_DFLT]);
13861385
kmem_cache_destroy(fnic_io_req_cache);

0 commit comments

Comments
 (0)