summaryrefslogtreecommitdiffstats
path: root/drivers/cdrom
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-01-12 16:01:27 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-14 15:07:24 -0800
commit577ebb374c78314ac4617242f509e2f5e7156649 (patch)
tree690ae95d67bb8f9fd66bc0daebc90a46904420ac /drivers/cdrom
parent81d48f0aee544885c39ef6e1ffb1175f276e6adf (diff)
downloadlinux-577ebb374c78314ac4617242f509e2f5e7156649.tar.gz
linux-577ebb374c78314ac4617242f509e2f5e7156649.tar.bz2
linux-577ebb374c78314ac4617242f509e2f5e7156649.zip
block: add and use scsi_blk_cmd_ioctl
Introduce a wrapper around scsi_cmd_ioctl that takes a block device. The function will then be enhanced to detect partition block devices and, in that case, subject the ioctls to whitelisting. Cc: linux-scsi@vger.kernel.org Cc: Jens Axboe <axboe@kernel.dk> Cc: James Bottomley <JBottomley@parallels.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/cdrom')
-rw-r--r--drivers/cdrom/cdrom.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index 1bbf7645a97c..55eaf474d32c 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -2746,12 +2746,11 @@ int cdrom_ioctl(struct cdrom_device_info *cdi, struct block_device *bdev,
{
void __user *argp = (void __user *)arg;
int ret;
- struct gendisk *disk = bdev->bd_disk;
/*
* Try the generic SCSI command ioctl's first.
*/
- ret = scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp);
+ ret = scsi_cmd_blk_ioctl(bdev, mode, cmd, argp);
if (ret != -ENOTTY)
return ret;