summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-linear.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2007-08-30 02:34:12 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2008-10-21 13:47:26 +0200
commit633a08b81206122469365b4c72eaeb71f04f2cb4 (patch)
tree9cd30507efd30645d30d351c7ad0d5966f806532 /drivers/md/dm-linear.c
parent[PATCH] switch pktcdvd to blkdev_driver_ioctl() (diff)
downloadlinux-633a08b81206122469365b4c72eaeb71f04f2cb4.tar.xz
linux-633a08b81206122469365b4c72eaeb71f04f2cb4.zip
[PATCH] introduce __blkdev_driver_ioctl()
Analog of blkdev_driver_ioctl() with sane arguments. For now uses fake struct file, by the end of the series it won't and blkdev_driver_ioctl() will become a wrapper around it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/md/dm-linear.c')
-rw-r--r--drivers/md/dm-linear.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c
index fa358385eed3..373442b1e98f 100644
--- a/drivers/md/dm-linear.c
+++ b/drivers/md/dm-linear.c
@@ -114,15 +114,7 @@ static int linear_ioctl(struct dm_target *ti, unsigned int cmd,
unsigned long arg)
{
struct linear_c *lc = (struct linear_c *) ti->private;
- struct block_device *bdev = lc->dev->bdev;
- struct file fake_file = {};
- struct dentry fake_dentry = {};
-
- fake_file.f_mode = lc->dev->mode;
- fake_file.f_path.dentry = &fake_dentry;
- fake_dentry.d_inode = bdev->bd_inode;
-
- return blkdev_driver_ioctl(bdev->bd_inode, &fake_file, bdev->bd_disk, cmd, arg);
+ return __blkdev_driver_ioctl(lc->dev->bdev, lc->dev->mode, cmd, arg);
}
static int linear_merge(struct dm_target *ti, struct bvec_merge_data *bvm,