ia64/xen-unstable

changeset 11674:52bb01f36c8b

[BLK] front: Flush workqueues with no locks held. Operation can sleep.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Fri Sep 29 09:23:18 2006 +0100 (2006-09-29)
parents dc017943eea2
children 6d5d5b883dfc
files linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Fri Sep 29 09:14:28 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Fri Sep 29 09:23:18 2006 +0100
     1.3 @@ -355,8 +355,10 @@ static void blkfront_closing(struct xenb
     1.4  	blk_stop_queue(info->rq);
     1.5  	/* No more gnttab callback work. */
     1.6  	gnttab_cancel_free_callback(&info->callback);
     1.7 +	spin_unlock_irqrestore(&blkif_io_lock, flags);
     1.8 +
     1.9 +	/* Flush gnttab callback work. Must be done with no locks held. */
    1.10  	flush_scheduled_work();
    1.11 -	spin_unlock_irqrestore(&blkif_io_lock, flags);
    1.12  
    1.13  	xlvbd_del(info);
    1.14  
    1.15 @@ -714,8 +716,10 @@ static void blkif_free(struct blkfront_i
    1.16  		blk_stop_queue(info->rq);
    1.17  	/* No more gnttab callback work. */
    1.18  	gnttab_cancel_free_callback(&info->callback);
    1.19 +	spin_unlock_irq(&blkif_io_lock);
    1.20 +
    1.21 +	/* Flush gnttab callback work. Must be done with no locks held. */
    1.22  	flush_scheduled_work();
    1.23 -	spin_unlock_irq(&blkif_io_lock);
    1.24  
    1.25  	/* Free resources associated with old device channel. */
    1.26  	if (info->ring_ref != GRANT_INVALID_REF) {