]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/commitdiff
linux pciback/pcifront: work queue management fixes
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 19 Mar 2009 10:06:52 +0000 (10:06 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 19 Mar 2009 10:06:52 +0000 (10:06 +0000)
flush_scheduled_work() only flushes work queued to the global
keventd_wq, but pciback is using its own local work queue, so that is
what needs to be flushed.

Calling cancel_delayed_work() on something never inserted through
queue_delayed_work() or schedule_delayed_work() is pointless.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
drivers/xen/pciback/xenbus.c
drivers/xen/pcifront/xenbus.c

index 70cd36bf8ac680c9dae6b7057e4e90625059408b..4d56c453e4973789cbdd2ab7a0b02e0ccf7ae4cb 100644 (file)
@@ -53,10 +53,9 @@ static void pciback_disconnect(struct pciback_device *pdev)
                pdev->evtchn_irq = INVALID_EVTCHN_IRQ;
        }
 
-       /* If the driver domain started an op, make sure we complete it or
-        * delete it before releasing the shared memory */
-       cancel_delayed_work(&pdev->op_work);
-       flush_scheduled_work();
+       /* If the driver domain started an op, make sure we complete it
+        * before releasing the shared memory */
+       flush_workqueue(pciback_wq);
 
        if (pdev->sh_info != NULL) {
                xenbus_unmap_ring_vfree(pdev->xdev, pdev->sh_area);
index d2af920535994984153b7bc7b095369ec56792e3..ca40547c4274359f1bd5de8ee88513b6cb3b471a 100644 (file)
@@ -64,7 +64,6 @@ static void free_pdev(struct pcifront_device *pdev)
        pcifront_free_roots(pdev);
 
        /*For PCIE_AER error handling job*/
-       cancel_delayed_work(&pdev->op_work);
        flush_scheduled_work();
        unbind_from_irqhandler(pdev->evtchn, pdev);