diff options
Diffstat (limited to 'drivers/md/dm-linear.c')
-rw-r--r-- | drivers/md/dm-linear.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c index 2a6bad451f86..00234909b3db 100644 --- a/drivers/md/dm-linear.c +++ b/drivers/md/dm-linear.c | |||
@@ -104,8 +104,14 @@ static int linear_ioctl(struct dm_target *ti, struct inode *inode, | |||
104 | { | 104 | { |
105 | struct linear_c *lc = (struct linear_c *) ti->private; | 105 | struct linear_c *lc = (struct linear_c *) ti->private; |
106 | struct block_device *bdev = lc->dev->bdev; | 106 | struct block_device *bdev = lc->dev->bdev; |
107 | struct file fake_file = {}; | ||
108 | struct dentry fake_dentry = {}; | ||
107 | 109 | ||
108 | return blkdev_driver_ioctl(bdev->bd_inode, filp, bdev->bd_disk, cmd, arg); | 110 | fake_file.f_mode = lc->dev->mode; |
111 | fake_file.f_dentry = &fake_dentry; | ||
112 | fake_dentry.d_inode = bdev->bd_inode; | ||
113 | |||
114 | return blkdev_driver_ioctl(bdev->bd_inode, &fake_file, bdev->bd_disk, cmd, arg); | ||
109 | } | 115 | } |
110 | 116 | ||
111 | static struct target_type linear_target = { | 117 | static struct target_type linear_target = { |