aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/xen-blkfront.c
diff options
context:
space:
mode:
authorWim Colgate <wim@xensource.com>2008-06-17 04:47:08 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-07-03 07:21:13 -0400
commit04c0635058256e2f4618139c237e56b5a4bdbb8f (patch)
tree37f7b3e44c52568fca7c51c28244fc84c4cb704b /drivers/block/xen-blkfront.c
parent440a01a7f46742400c74d9d346118523e81d188b (diff)
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>
Diffstat (limited to 'drivers/block/xen-blkfront.c')
-rw-r--r--drivers/block/xen-blkfront.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index da3fee6bf530..a39b4b2b0c50 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)
997 struct xenbus_device *dev = info->xbdev; 997 struct xenbus_device *dev = info->xbdev;
998 enum xenbus_state state = xenbus_read_driver_state(dev->otherend); 998 enum xenbus_state state = xenbus_read_driver_state(dev->otherend);
999 999
1000 if (state == XenbusStateClosing) 1000 if (state == XenbusStateClosing && info->is_ready)
1001 blkfront_closing(dev); 1001 blkfront_closing(dev);
1002 } 1002 }
1003 return 0; 1003 return 0;