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/cciss.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/cciss.c')
-rw-r--r-- | drivers/block/cciss.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 587cce57adae..b0f553b26d0f 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
@@ -1735,7 +1735,7 @@ static int cciss_ioctl(struct block_device *bdev, fmode_t mode, | |||
1735 | case CCISS_BIG_PASSTHRU: | 1735 | case CCISS_BIG_PASSTHRU: |
1736 | return cciss_bigpassthru(h, argp); | 1736 | return cciss_bigpassthru(h, argp); |
1737 | 1737 | ||
1738 | /* scsi_cmd_ioctl handles these, below, though some are not */ | 1738 | /* scsi_cmd_blk_ioctl handles these, below, though some are not */ |
1739 | /* very meaningful for cciss. SG_IO is the main one people want. */ | 1739 | /* very meaningful for cciss. SG_IO is the main one people want. */ |
1740 | 1740 | ||
1741 | case SG_GET_VERSION_NUM: | 1741 | case SG_GET_VERSION_NUM: |
@@ -1746,9 +1746,9 @@ static int cciss_ioctl(struct block_device *bdev, fmode_t mode, | |||
1746 | case SG_EMULATED_HOST: | 1746 | case SG_EMULATED_HOST: |
1747 | case SG_IO: | 1747 | case SG_IO: |
1748 | case SCSI_IOCTL_SEND_COMMAND: | 1748 | case SCSI_IOCTL_SEND_COMMAND: |
1749 | return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp); | 1749 | return scsi_cmd_blk_ioctl(bdev, mode, cmd, argp); |
1750 | 1750 | ||
1751 | /* scsi_cmd_ioctl would normally handle these, below, but */ | 1751 | /* scsi_cmd_blk_ioctl would normally handle these, below, but */ |
1752 | /* they aren't a good fit for cciss, as CD-ROMs are */ | 1752 | /* they aren't a good fit for cciss, as CD-ROMs are */ |
1753 | /* not supported, and we don't have any bus/target/lun */ | 1753 | /* not supported, and we don't have any bus/target/lun */ |
1754 | /* which we present to the kernel. */ | 1754 | /* which we present to the kernel. */ |