aboutsummaryrefslogtreecommitdiffstats
path: root/block/ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/ioctl.c')
-rw-r--r--block/ioctl.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/block/ioctl.c b/block/ioctl.c
index e8eb679f2f9b..1cfa8d449d90 100644
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@ -163,18 +163,10 @@ int __blkdev_driver_ioctl(struct block_device *bdev, fmode_t mode,
163 unsigned cmd, unsigned long arg) 163 unsigned cmd, unsigned long arg)
164{ 164{
165 struct gendisk *disk = bdev->bd_disk; 165 struct gendisk *disk = bdev->bd_disk;
166 int ret;
167 166
168 if (disk->fops->ioctl) 167 if (disk->fops->ioctl)
169 return disk->fops->ioctl(bdev, mode, cmd, arg); 168 return disk->fops->ioctl(bdev, mode, cmd, arg);
170 169
171 if (disk->fops->locked_ioctl) {
172 lock_kernel();
173 ret = disk->fops->locked_ioctl(bdev, mode, cmd, arg);
174 unlock_kernel();
175 return ret;
176 }
177
178 return -ENOTTY; 170 return -ENOTTY;
179} 171}
180/* 172/*
@@ -185,8 +177,7 @@ int __blkdev_driver_ioctl(struct block_device *bdev, fmode_t mode,
185EXPORT_SYMBOL_GPL(__blkdev_driver_ioctl); 177EXPORT_SYMBOL_GPL(__blkdev_driver_ioctl);
186 178
187/* 179/*
188 * always keep this in sync with compat_blkdev_ioctl() and 180 * always keep this in sync with compat_blkdev_ioctl()
189 * compat_blkdev_locked_ioctl()
190 */ 181 */
191int blkdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd, 182int blkdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd,
192 unsigned long arg) 183 unsigned long arg)