diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-01-12 16:01:27 +0100 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2013-04-05 09:13:01 +0300 |
commit | 4471697db678961e31e2ddb2bc10101dd2c81938 (patch) | |
tree | 9d9cca86b8d1653b7673b9092dd9c3df108c0aab /block/scsi_ioctl.c | |
parent | 98f95f576ab386ad59338b064063da0cdb3a52ee (diff) | |
download | kernel-mfld-blackbay-4471697db678961e31e2ddb2bc10101dd2c81938.tar.gz kernel-mfld-blackbay-4471697db678961e31e2ddb2bc10101dd2c81938.tar.bz2 kernel-mfld-blackbay-4471697db678961e31e2ddb2bc10101dd2c81938.zip |
block: add and use scsi_blk_cmd_ioctl
commit 577ebb374c78314ac4617242f509e2f5e7156649 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'block/scsi_ioctl.c')
-rw-r--r-- | block/scsi_ioctl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index 4f4230b79bb..57ac9375484 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c @@ -691,6 +691,13 @@ int scsi_cmd_ioctl(struct request_queue *q, struct gendisk *bd_disk, fmode_t mod } EXPORT_SYMBOL(scsi_cmd_ioctl); +int scsi_cmd_blk_ioctl(struct block_device *bd, fmode_t mode, + unsigned int cmd, void __user *arg) +{ + return scsi_cmd_ioctl(bd->bd_disk->queue, bd->bd_disk, mode, cmd, arg); +} +EXPORT_SYMBOL(scsi_cmd_blk_ioctl); + static int __init blk_scsi_ioctl_init(void) { blk_set_cmd_filter_defaults(&blk_default_cmd_filter); |