Skip to contentSkip to conversation

linux pciback/pcifront: work queue management fixes

PATCH New Jan Beulich 1 participant 1 message Mar 19, 2009 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux pciback/pcifront: work queue management fixes

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.

drivers/xen/pciback/xenbus.c +3 -4
@@ -53,10 +53,9 @@ static void pciback_disconnect(struct pc
 		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);
drivers/xen/pcifront/xenbus.c +0 -1
@@ -64,7 +64,6 @@ static void free_pdev(struct pcifront_de
 	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);