Skip to content

Commit

Permalink
xen/blkback: Update to use blkdev_get_by_dev instead of open_by_devnum.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Konrad Rzeszutek Wilk committed Apr 14, 2011
1 parent 248e9f7 commit bc0c081
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/xen/blkback/vbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit bc0c081

Please sign in to comment.