aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-01-12 10:01:27 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-14 18:07:24 -0500
commit577ebb374c78314ac4617242f509e2f5e7156649 (patch)
tree690ae95d67bb8f9fd66bc0daebc90a46904420ac /drivers/scsi/sd.c
parent81d48f0aee544885c39ef6e1ffb1175f276e6adf (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/scsi/sd.c')
-rw-r--r--drivers/scsi/sd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 7b3f8075e2a5..b4d57bb04c72 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1097,7 +1097,7 @@ static int sd_ioctl(struct block_device *bdev, fmode_t mode,
1097 error = scsi_ioctl(sdp, cmd, p); 1097 error = scsi_ioctl(sdp, cmd, p);
1098 break; 1098 break;
1099 default: 1099 default:
1100 error = scsi_cmd_ioctl(disk->queue, disk, mode, cmd, p); 1100 error = scsi_cmd_blk_ioctl(bdev, mode, cmd, p);
1101 if (error != -ENOTTY) 1101 if (error != -ENOTTY)
1102 break; 1102 break;
1103 error = scsi_ioctl(sdp, cmd, p); 1103 error = scsi_ioctl(sdp, cmd, p);