[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] linux pciback/pcifront: work queue management fixes



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1237457212 0
# Node ID 158d62a67d4509a58b6f5940f55392a279a60c11
# Parent  8ebd33ba19b38db245a69f3f3358a24295120552
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.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 drivers/xen/pciback/xenbus.c  |    7 +++----
 drivers/xen/pcifront/xenbus.c |    1 -
 2 files changed, 3 insertions(+), 5 deletions(-)

diff -r 8ebd33ba19b3 -r 158d62a67d45 drivers/xen/pciback/xenbus.c
--- a/drivers/xen/pciback/xenbus.c      Thu Mar 19 10:06:14 2009 +0000
+++ b/drivers/xen/pciback/xenbus.c      Thu Mar 19 10:06:52 2009 +0000
@@ -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);
diff -r 8ebd33ba19b3 -r 158d62a67d45 drivers/xen/pcifront/xenbus.c
--- a/drivers/xen/pcifront/xenbus.c     Thu Mar 19 10:06:14 2009 +0000
+++ b/drivers/xen/pcifront/xenbus.c     Thu Mar 19 10:06:52 2009 +0000
@@ -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);
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.