block: add and use scsi_blk_cmd_ioctl
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 12 Jan 2012 15:01:27 +0000 (16:01 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 26 Jan 2012 01:24:54 +0000 (17:24 -0800)
commit3b8373b85c761b2a12bdaf9fcee4c7a3eefa8459
tree4960b4933b6eaf81c07f65bbae8d54aa081eadf8
parent3ec3f83aee534f732fd7012ff6c04776952e47fd
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>
block/scsi_ioctl.c
drivers/block/cciss.c
drivers/block/ub.c
drivers/block/virtio_blk.c
drivers/cdrom/cdrom.c
drivers/ide/ide-floppy_ioctl.c
drivers/scsi/sd.c
include/linux/blkdev.h