nvme-fc: avoid workqueue flush stalls
authorJames Smart <jsmart2021@gmail.com>
Thu, 28 Sep 2017 16:56:31 +0000 (09:56 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 1 Nov 2017 15:28:03 +0000 (16:28 +0100)
There's no need to wait for the full nvme_wq, which is now shared,
to flush. flush only the delete_work item.

Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Sagi Grimberg <sgi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/fc.c

index b600c07803cf37cc66a7610033d0e85f21c03744..50cc17e99475ea4c101f43c9435ecbf42b21dfaa 100644 (file)
@@ -2693,7 +2693,7 @@ nvme_fc_del_nvme_ctrl(struct nvme_ctrl *nctrl)
        nvme_get_ctrl(&ctrl->ctrl);
        ret = __nvme_fc_del_ctrl(ctrl);
        if (!ret)
-               flush_workqueue(nvme_wq);
+               flush_work(&ctrl->delete_work);
        nvme_put_ctrl(&ctrl->ctrl);
 
        return ret;