ia64/xen-unstable

changeset 12557:c98a8e2c62d1

[BLKFRONT] Only attempt to recover a device on resume if it was connected when
we suspended.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
author Ian Campbell <ian.campbell@xensource.com>
date Thu Nov 23 15:06:35 2006 +0000 (2006-11-23)
parents 4ddda0bbb57c
children 2d8784764b52
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	Thu Nov 23 09:36:48 2006 +0000
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Thu Nov 23 15:06:35 2006 +0000
     1.3 @@ -138,10 +138,10 @@ static int blkfront_resume(struct xenbus
     1.4  
     1.5  	DPRINTK("blkfront_resume: %s\n", dev->nodename);
     1.6  
     1.7 -	blkif_free(info, 1);
     1.8 +	blkif_free(info, info->connected == BLKIF_STATE_CONNECTED);
     1.9  
    1.10  	err = talk_to_backend(dev, info);
    1.11 -	if (!err)
    1.12 +	if (info->connected == BLKIF_STATE_SUSPENDED && !err)
    1.13  		blkif_recover(info);
    1.14  
    1.15  	return err;