Skip to content

Commit 04c0635

Browse files
Wim ColgateJens Axboe
authored andcommitted
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 <[email protected]> Signed-off-by: Jeremy Fitzhardinge <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 440a01a commit 04c0635

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/block/xen-blkfront.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ static int blkif_release(struct inode *inode, struct file *filep)
997997
struct xenbus_device *dev = info->xbdev;
998998
enum xenbus_state state = xenbus_read_driver_state(dev->otherend);
999999

1000-
if (state == XenbusStateClosing)
1000+
if (state == XenbusStateClosing && info->is_ready)
10011001
blkfront_closing(dev);
10021002
}
10031003
return 0;

0 commit comments

Comments
 (0)