Commit 53f0e8af authored by Jeremy Fitzhardinge's avatar Jeremy Fitzhardinge Committed by Ingo Molnar

xen/blkfront: use bdget_disk

info->dev is never initialized to anything, so bdget(info->dev) is
meaningless.  Get rid of info->dev, and use bdget_disk on the gendisk.
Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 3e334239
...@@ -75,7 +75,6 @@ static struct block_device_operations xlvbd_block_fops; ...@@ -75,7 +75,6 @@ static struct block_device_operations xlvbd_block_fops;
struct blkfront_info struct blkfront_info
{ {
struct xenbus_device *xbdev; struct xenbus_device *xbdev;
dev_t dev;
struct gendisk *gd; struct gendisk *gd;
int vdevice; int vdevice;
blkif_vdev_t handle; blkif_vdev_t handle;
...@@ -903,7 +902,7 @@ static void backend_changed(struct xenbus_device *dev, ...@@ -903,7 +902,7 @@ static void backend_changed(struct xenbus_device *dev,
break; break;
case XenbusStateClosing: case XenbusStateClosing:
bd = bdget(info->dev); bd = bdget_disk(info->gd, 0);
if (bd == NULL) if (bd == NULL)
xenbus_dev_fatal(dev, -ENODEV, "bdget failed"); xenbus_dev_fatal(dev, -ENODEV, "bdget failed");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment