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: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Cc: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
committed by
Ingo Molnar
parent
3e334239d8
commit
53f0e8afcb
@@ -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,
|
|||||||
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");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user