xen/blkback: Update to use blkdev_get_by_dev instead of open_by_devnum.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 25 Feb 2011 15:02:39 +0000 (10:02 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 14 Apr 2011 22:26:18 +0000 (18:26 -0400)
The API for opening a block device has changed since 2.6.32. The
correct function to open a device is blkdev_get_by_dev.

drivers/xen/blkback/vbd.c

index dc25723..8c91a2f 100644 (file)
@@ -63,8 +63,8 @@ int vbd_create(blkif_t *blkif, blkif_vdev_t handle, unsigned major,
 
        vbd->pdevice  = MKDEV(major, minor);
 
-       bdev = open_by_devnum(vbd->pdevice,
-                             vbd->readonly ? FMODE_READ : FMODE_WRITE);
+       bdev = blkdev_get_by_dev(vbd->pdevice, vbd->readonly ?
+                                FMODE_READ : FMODE_WRITE, NULL);
 
        if (IS_ERR(bdev)) {
                DPRINTK("vbd_creat: device %08x could not be opened.\n",