提交 53f0e8af 编写于 作者: J Jeremy Fitzhardinge 提交者: 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: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 3e334239
......@@ -75,7 +75,6 @@ static struct block_device_operations xlvbd_block_fops;
struct blkfront_info
{
struct xenbus_device *xbdev;
dev_t dev;
struct gendisk *gd;
int vdevice;
blkif_vdev_t handle;
......@@ -903,7 +902,7 @@ static void backend_changed(struct xenbus_device *dev,
break;
case XenbusStateClosing:
bd = bdget(info->dev);
bd = bdget_disk(info->gd, 0);
if (bd == NULL)
xenbus_dev_fatal(dev, -ENODEV, "bdget failed");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册