ia64/linux-2.6.18-xen.hg

changeset 837:158d62a67d45

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@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Mar 19 10:06:52 2009 +0000 (2009-03-19)
parents 8ebd33ba19b3
children 6a0fee3b8b7d
files drivers/xen/pciback/xenbus.c drivers/xen/pcifront/xenbus.c
line diff
     1.1 --- a/drivers/xen/pciback/xenbus.c	Thu Mar 19 10:06:14 2009 +0000
     1.2 +++ b/drivers/xen/pciback/xenbus.c	Thu Mar 19 10:06:52 2009 +0000
     1.3 @@ -53,10 +53,9 @@ static void pciback_disconnect(struct pc
     1.4  		pdev->evtchn_irq = INVALID_EVTCHN_IRQ;
     1.5  	}
     1.6  
     1.7 -	/* If the driver domain started an op, make sure we complete it or
     1.8 -	 * delete it before releasing the shared memory */
     1.9 -	cancel_delayed_work(&pdev->op_work);
    1.10 -	flush_scheduled_work();
    1.11 +	/* If the driver domain started an op, make sure we complete it
    1.12 +	 * before releasing the shared memory */
    1.13 +	flush_workqueue(pciback_wq);
    1.14  
    1.15  	if (pdev->sh_info != NULL) {
    1.16  		xenbus_unmap_ring_vfree(pdev->xdev, pdev->sh_area);
     2.1 --- a/drivers/xen/pcifront/xenbus.c	Thu Mar 19 10:06:14 2009 +0000
     2.2 +++ b/drivers/xen/pcifront/xenbus.c	Thu Mar 19 10:06:52 2009 +0000
     2.3 @@ -64,7 +64,6 @@ static void free_pdev(struct pcifront_de
     2.4  	pcifront_free_roots(pdev);
     2.5  
     2.6  	/*For PCIE_AER error handling job*/
     2.7 -	cancel_delayed_work(&pdev->op_work);
     2.8  	flush_scheduled_work();
     2.9  	unbind_from_irqhandler(pdev->evtchn, pdev);
    2.10