From: Wim Colgate Date: Tue, 17 Jun 2008 08:47:08 +0000 (+0200) Subject: xen/blkfront: Make sure that the device is fully ready before allowing release. X-Git-Tag: v2.6.27-rc1~1114^2~28 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=04c0635058256e2f4618139c237e56b5a4bdbb8f;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Jeremy Fitzhardinge Signed-off-by: Jens Axboe --- diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index da3fee6bf53..a39b4b2b0c5 100644 --- a/drivers/block/xen-blkfront.c +++ b/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;