@@ -756,7 +756,6 @@ void
bfad_destroy_workq(struct bfad_im_s *im)
{
if (im && im->drv_workq) {
- flush_workqueue(im->drv_workq);
destroy_workqueue(im->drv_workq);
im->drv_workq = NULL;
}
@@ -1145,10 +1145,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);
@@ -8529,7 +8529,6 @@ static void
lpfc_unset_driver_resource_phase2(struct lpfc_hba *phba)
{
if (phba->wq) {
- flush_workqueue(phba->wq);
destroy_workqueue(phba->wq);
phba->wq = NULL;
}
@@ -2422,13 +2422,11 @@ static void __qedi_remove(struct pci_dev *pdev, int mode)
iscsi_host_remove(qedi->shost);
if (qedi->tmf_thread) {
- flush_workqueue(qedi->tmf_thread);
destroy_workqueue(qedi->tmf_thread);
qedi->tmf_thread = NULL;
}
if (qedi->offload_thread) {
- flush_workqueue(qedi->offload_thread);
destroy_workqueue(qedi->offload_thread);
qedi->offload_thread = NULL;
}
@@ -3922,7 +3922,6 @@ qla2x00_free_device(scsi_qla_host_t *vha)
/* Flush the work queue and remove it */
if (ha->wq) {
- flush_workqueue(ha->wq);
destroy_workqueue(ha->wq);
ha->wq = NULL;
}
'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: Christophe JAILLET <christophe.jaillet@wanadoo.fr> --- drivers/scsi/bfa/bfad_im.c | 1 - drivers/scsi/fnic/fnic_main.c | 4 +--- drivers/scsi/lpfc/lpfc_init.c | 1 - drivers/scsi/qedi/qedi_main.c | 2 -- drivers/scsi/qla2xxx/qla_os.c | 1 - 5 files changed, 1 insertion(+), 8 deletions(-)