summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--block/ioctl.c5
-rw-r--r--drivers/md/dm-linear.c2
-rw-r--r--drivers/md/dm-mpath.c3
-rw-r--r--include/linux/fs.h3
4 files changed, 9 insertions, 4 deletions
diff --git a/block/ioctl.c b/block/ioctl.c
index 309760b7e37f..58aab630dfc1 100644
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@ -199,8 +199,8 @@ static int blkdev_locked_ioctl(struct file *file, struct block_device *bdev,
return -ENOIOCTLCMD;
}
-static int blkdev_driver_ioctl(struct inode *inode, struct file *file,
- struct gendisk *disk, unsigned cmd, unsigned long arg)
+int blkdev_driver_ioctl(struct inode *inode, struct file *file,
+ struct gendisk *disk, unsigned cmd, unsigned long arg)
{
int ret;
if (disk->fops->unlocked_ioctl)
@@ -215,6 +215,7 @@ static int blkdev_driver_ioctl(struct inode *inode, struct file *file,
return -ENOTTY;
}
+EXPORT_SYMBOL_GPL(blkdev_driver_ioctl);
int blkdev_ioctl(struct inode *inode, struct file *file, unsigned cmd,
unsigned long arg)
diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c
index c58f072ccae6..2a6bad451f86 100644
--- a/drivers/md/dm-linear.c
+++ b/drivers/md/dm-linear.c
@@ -105,7 +105,7 @@ static int linear_ioctl(struct dm_target *ti, struct inode *inode,
struct linear_c *lc = (struct linear_c *) ti->private;
struct block_device *bdev = lc->dev->bdev;
- return blkdev_ioctl(bdev->bd_inode, filp, cmd, arg);
+ return blkdev_driver_ioctl(bdev->bd_inode, filp, bdev->bd_disk, cmd, arg);
}
static struct target_type linear_target = {
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 14cfdb538efd..dcfbf830964c 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -1290,7 +1290,8 @@ static int multipath_ioctl(struct dm_target *ti, struct inode *inode,
spin_unlock_irqrestore(&m->lock, flags);
- return r ? : blkdev_ioctl(bdev->bd_inode, filp, cmd, arg);
+ return r ? : blkdev_driver_ioctl(bdev->bd_inode, filp, bdev->bd_disk,
+ cmd, arg);
}
/*-----------------------------------------------------------------
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 7b61e94bf8fc..f53bf4ff1955 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1523,6 +1523,9 @@ extern const struct file_operations def_fifo_fops;
#ifdef CONFIG_BLOCK
extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long);
extern int blkdev_ioctl(struct inode *, struct file *, unsigned, unsigned long);
+extern int blkdev_driver_ioctl(struct inode *inode, struct file *file,
+ struct gendisk *disk, unsigned cmd,
+ unsigned long arg);
extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long);
extern int blkdev_get(struct block_device *, mode_t, unsigned);
extern int blkdev_put(struct block_device *);