aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-05-22 14:28:35 -0400
committerJens Axboe <jens.axboe@oracle.com>2009-05-22 14:28:35 -0400
commit9bd7de51ee8537094656149eaf45338cadb7d7d4 (patch)
treea691987319dfcdb07de2bce619746f88d26882c4 /drivers/block
parente4b636366c00738b9609cda307014d71b1225b7f (diff)
parent6a44587ee716ac911082cbdec766e5b3f051c071 (diff)
Merge branch 'master' into for-2.6.31
Conflicts: drivers/ide/ide-io.c Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/xen-blkfront.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 6d5950839bd..132120ae4bd 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -932,8 +932,6 @@ static void blkfront_closing(struct xenbus_device *dev)
932 932
933 spin_lock_irqsave(&blkif_io_lock, flags); 933 spin_lock_irqsave(&blkif_io_lock, flags);
934 934
935 del_gendisk(info->gd);
936
937 /* No more blkif_request(). */ 935 /* No more blkif_request(). */
938 blk_stop_queue(info->rq); 936 blk_stop_queue(info->rq);
939 937
@@ -947,6 +945,8 @@ static void blkfront_closing(struct xenbus_device *dev)
947 blk_cleanup_queue(info->rq); 945 blk_cleanup_queue(info->rq);
948 info->rq = NULL; 946 info->rq = NULL;
949 947
948 del_gendisk(info->gd);
949
950 out: 950 out:
951 xenbus_frontend_closed(dev); 951 xenbus_frontend_closed(dev);
952} 952}
@@ -975,8 +975,10 @@ static void backend_changed(struct xenbus_device *dev,
975 break; 975 break;
976 976
977 case XenbusStateClosing: 977 case XenbusStateClosing:
978 if (info->gd == NULL) 978 if (info->gd == NULL) {
979 xenbus_dev_fatal(dev, -ENODEV, "gd is NULL"); 979 xenbus_frontend_closed(dev);
980 break;
981 }
980 bd = bdget_disk(info->gd, 0); 982 bd = bdget_disk(info->gd, 0);
981 if (bd == NULL) 983 if (bd == NULL)
982 xenbus_dev_fatal(dev, -ENODEV, "bdget failed"); 984 xenbus_dev_fatal(dev, -ENODEV, "bdget failed");