提交 04c06350 编写于 作者: W Wim Colgate 提交者: Jens Axboe

xen/blkfront: Make sure that the device is fully ready before allowing release.

[ linux-2.6.18-xen changeset c1c57fea77e9 ]
Signed-off-by: NWim Colgate <wim@xensource.com>
Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 440a01a7
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册