diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-01-12 10:01:27 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-14 18:07:24 -0500 |
commit | 577ebb374c78314ac4617242f509e2f5e7156649 (patch) | |
tree | 690ae95d67bb8f9fd66bc0daebc90a46904420ac /drivers/cdrom/cdrom.c | |
parent | 81d48f0aee544885c39ef6e1ffb1175f276e6adf (diff) |
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/cdrom.c')
-rw-r--r-- | drivers/cdrom/cdrom.c | 3 |
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, | |||
2746 | { | 2746 | { |
2747 | void __user *argp = (void __user *)arg; | 2747 | void __user *argp = (void __user *)arg; |
2748 | int ret; | 2748 | int ret; |
2749 | struct gendisk *disk = bdev->bd_disk; | ||
2750 | 2749 | ||
2751 | /* | 2750 | /* |
2752 | * Try the generic SCSI command ioctl's first. | 2751 | * Try the generic SCSI command ioctl's first. |
2753 | */ | 2752 | */ |
2754 | ret = scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp); | 2753 | ret = scsi_cmd_blk_ioctl(bdev, mode, cmd, argp); |
2755 | if (ret != -ENOTTY) | 2754 | if (ret != -ENOTTY) |
2756 | return ret; | 2755 | return ret; |
2757 | 2756 | ||