diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-01-12 15:01:27 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-14 23:07:24 (GMT) |
commit | 577ebb374c78314ac4617242f509e2f5e7156649 (patch) | |
tree | 690ae95d67bb8f9fd66bc0daebc90a46904420ac /drivers/block/ub.c | |
parent | 81d48f0aee544885c39ef6e1ffb1175f276e6adf (diff) | |
download | linux-577ebb374c78314ac4617242f509e2f5e7156649.tar.xz |
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/block/ub.c')
-rw-r--r-- | drivers/block/ub.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/block/ub.c b/drivers/block/ub.c index 0e376d4..7333b9e 100644 --- a/drivers/block/ub.c +++ b/drivers/block/ub.c @@ -1744,12 +1744,11 @@ static int ub_bd_release(struct gendisk *disk, fmode_t mode) static int ub_bd_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd, unsigned long arg) { - struct gendisk *disk = bdev->bd_disk; void __user *usermem = (void __user *) arg; int ret; mutex_lock(&ub_mutex); - ret = scsi_cmd_ioctl(disk->queue, disk, mode, cmd, usermem); + ret = scsi_cmd_blk_ioctl(bdev, mode, cmd, usermem); mutex_unlock(&ub_mutex); return ret; |