[PATCH 3 of 5] xen/blkfront: Make sure that the device is fully ready before allowing release

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jeff Garzik <jgarzik.pobox.com@...>
Cc: Jens Axboe <jens.axboe@...>, LKML <linux-kernel@...>
Date: Friday, May 30, 2008 - 7:50 pm

From: Wim Colgate <wim@xensource.com>

[ linux-2.6.18-xen changeset c1c57fea77e9 ]

Signed-off-by: Wim Colgate <wim@xensource.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>

---
 drivers/block/xen-blkfront.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -997,7 +997,7 @@
 		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;


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0 of 5] xen device driver updates, Jeremy Fitzhardinge, (Fri May 30, 7:50 pm)
[PATCH 5 of 5] xen: Avoid allocations causing swap activity ..., Jeremy Fitzhardinge, (Fri May 30, 7:50 pm)
[PATCH 2 of 5] xn/blkfront: Add the CDROM_GET_CAPABILITY ioc..., Jeremy Fitzhardinge, (Fri May 30, 7:50 pm)
[PATCH 1 of 5] xen/blkfront: Make sure we don't use bounce b..., Jeremy Fitzhardinge, (Fri May 30, 7:50 pm)
[PATCH 4 of 5] xen/blkfront: add __exit to module_exit() han..., Jeremy Fitzhardinge, (Fri May 30, 7:50 pm)
[PATCH 3 of 5] xen/blkfront: Make sure that the device is fu..., Jeremy Fitzhardinge, (Fri May 30, 7:50 pm)