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/block/virtio_blk.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/block/virtio_blk.c')
-rw-r--r-- | drivers/block/virtio_blk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index ffd5ca919295..c4a60badf252 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c | |||
@@ -250,8 +250,8 @@ static int virtblk_ioctl(struct block_device *bdev, fmode_t mode, | |||
250 | if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI)) | 250 | if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI)) |
251 | return -ENOTTY; | 251 | return -ENOTTY; |
252 | 252 | ||
253 | return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, | 253 | return scsi_cmd_blk_ioctl(bdev, mode, cmd, |
254 | (void __user *)data); | 254 | (void __user *)data); |
255 | } | 255 | } |
256 | 256 | ||
257 | /* We provide getgeo only to please some old bootloader/partitioning tools */ | 257 | /* We provide getgeo only to please some old bootloader/partitioning tools */ |