Commit 2d06a9e3 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] prepare for 32-bit dev_t: dm-ioctl-*.c

	Added old_encode_dev()/old_decode_dev() in dm-ioctl-*.c
parent 1684b4e9
......@@ -459,7 +459,7 @@ static int __info(struct mapped_device *md, struct dm_ioctl *param)
if (!bdev)
return -ENXIO;
param->dev = bdev->bd_dev;
param->dev = old_encode_dev(bdev->bd_dev);
param->open_count = bdev->bd_openers;
bdput(bdev);
......@@ -577,7 +577,7 @@ static int create(struct dm_ioctl *param, struct dm_ioctl *user)
}
if (param->flags & DM_PERSISTENT_DEV_FLAG)
r = dm_create_with_minor(MINOR(param->dev), &md);
r = dm_create_with_minor(MINOR(old_decode_dev(param->dev)), &md);
else
r = dm_create(&md);
......@@ -816,7 +816,7 @@ static int dep(struct dm_ioctl *param, struct dm_ioctl *user)
count = 0;
list_for_each(tmp, dm_table_get_devices(table)) {
struct dm_dev *dd = list_entry(tmp, struct dm_dev, list);
deps->dev[count++] = dd->bdev->bd_dev;
deps->dev[count++] = old_encode_dev(dd->bdev->bd_dev);
}
dm_table_put(table);
dm_put(md);
......
......@@ -401,7 +401,7 @@ static int list_devices(struct dm_ioctl *param, size_t param_size)
old_nl->next = (uint32_t) ((void *) nl -
(void *) old_nl);
disk = dm_disk(hc->md);
nl->dev = MKDEV(disk->major, disk->first_minor);
nl->dev = old_encode_dev(MKDEV(disk->major, disk->first_minor));
nl->next = 0;
strcpy(nl->name, hc->name);
......@@ -445,7 +445,7 @@ static int __dev_status(struct mapped_device *md, struct dm_ioctl *param)
if (!bdev)
return -ENXIO;
param->dev = MKDEV(disk->major, disk->first_minor);
param->dev = old_encode_dev(MKDEV(disk->major, disk->first_minor));
/*
* Yes, this will be out of date by the time it gets back
......@@ -481,7 +481,7 @@ static int dev_create(struct dm_ioctl *param, size_t param_size)
return r;
if (param->flags & DM_PERSISTENT_DEV_FLAG)
r = dm_create_with_minor(MINOR(param->dev), &md);
r = dm_create_with_minor(MINOR(old_decode_dev(param->dev)), &md);
else
r = dm_create(&md);
......@@ -961,7 +961,7 @@ static void retrieve_deps(struct dm_table *table,
count = 0;
list_for_each(tmp, dm_table_get_devices(table)) {
struct dm_dev *dd = list_entry(tmp, struct dm_dev, list);
deps->dev[count++] = dd->bdev->bd_dev;
deps->dev[count++] = old_encode_dev(dd->bdev->bd_dev);
}
param->data_size = param->data_start + needed;
......
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