Selaa lähdekoodia

xen/blkfront: Make sure that the device is fully ready before allowing release.

[ linux-2.6.18-xen changeset c1c57fea77e9 ]

Signed-off-by: Wim Colgate <wim@xensource.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Wim Colgate 17 vuotta sitten
vanhempi
commit
04c0635058
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      drivers/block/xen-blkfront.c

+ 1 - 1
drivers/block/xen-blkfront.c

@@ -997,7 +997,7 @@ static int blkif_release(struct inode *inode, struct file *filep)
 		struct xenbus_device *dev = info->xbdev;
 		enum xenbus_state state = xenbus_read_driver_state(dev->otherend);
 
-		if (state == XenbusStateClosing)
+		if (state == XenbusStateClosing && info->is_ready)
 			blkfront_closing(dev);
 	}
 	return 0;