From 04c0635058256e2f4618139c237e56b5a4bdbb8f Mon Sep 17 00:00:00 2001 From: Wim Colgate Date: Tue, 17 Jun 2008 10:47:08 +0200 Subject: [PATCH] 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 --- drivers/block/xen-blkfront.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index da3fee6bf5..a39b4b2b0c 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; -- 2.39.5