]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
xen/blkfront: Make sure that the device is fully ready before allowing release.
authorWim Colgate <wim@xensource.com>
Tue, 17 Jun 2008 08:47:08 +0000 (10:47 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 3 Jul 2008 11:21:13 +0000 (13:21 +0200)
[ 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>
drivers/block/xen-blkfront.c

index da3fee6bf53043478733fe5fd928e64de14e0705..a39b4b2b0c50a4e362b0e566a2d3b11767e81089 100644 (file)
@@ -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;