Skip to content

Commit

Permalink
xen/blkfront: Make sure that the device is fully ready before allowin…
Browse files Browse the repository at this point in the history
…g 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>
  • Loading branch information
Wim Colgate authored and Jens Axboe committed Jul 3, 2008
1 parent 440a01a commit 04c0635
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/xen-blkfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 04c0635

Please sign in to comment.