summaryrefslogtreecommitdiff
path: root/drivers/block/xen-blkfront.c
diff options
context:
space:
mode:
authorWim Colgate <wim@xensource.com>2008-06-17 12:47:08 +0400
committerJens Axboe <jens.axboe@oracle.com>2008-07-03 15:21:13 +0400
commit04c0635058256e2f4618139c237e56b5a4bdbb8f (patch)
tree37f7b3e44c52568fca7c51c28244fc84c4cb704b /drivers/block/xen-blkfront.c
parent440a01a7f46742400c74d9d346118523e81d188b (diff)
downloadlinux-04c0635058256e2f4618139c237e56b5a4bdbb8f.tar.xz
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)
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;