diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-01-12 10:01:27 -0500 |
---|---|---|
committer | Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com> | 2012-02-13 15:14:56 -0500 |
commit | d62410b9b208e15caca30e40c179a79f3ca8f96c (patch) | |
tree | e212caff427fd6882e1626024596cd18ddc27db8 /drivers/ide | |
parent | 554ca39e6694d4e3d0a70afc56efc3beca410fca (diff) |
block: add and use scsi_blk_cmd_ioctl
BugLink: http://bugs.launchpad.net/bugs/922799
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>
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-floppy_ioctl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/ide/ide-floppy_ioctl.c b/drivers/ide/ide-floppy_ioctl.c index d267b7affad..a22ca846701 100644 --- a/drivers/ide/ide-floppy_ioctl.c +++ b/drivers/ide/ide-floppy_ioctl.c | |||
@@ -292,8 +292,7 @@ int ide_floppy_ioctl(ide_drive_t *drive, struct block_device *bdev, | |||
292 | * and CDROM_SEND_PACKET (legacy) ioctls | 292 | * and CDROM_SEND_PACKET (legacy) ioctls |
293 | */ | 293 | */ |
294 | if (cmd != CDROM_SEND_PACKET && cmd != SCSI_IOCTL_SEND_COMMAND) | 294 | if (cmd != CDROM_SEND_PACKET && cmd != SCSI_IOCTL_SEND_COMMAND) |
295 | err = scsi_cmd_ioctl(bdev->bd_disk->queue, bdev->bd_disk, | 295 | err = scsi_cmd_blk_ioctl(bdev, mode, cmd, argp); |
296 | mode, cmd, argp); | ||
297 | 296 | ||
298 | if (err == -ENOTTY) | 297 | if (err == -ENOTTY) |
299 | err = generic_ide_ioctl(drive, bdev, cmd, arg); | 298 | err = generic_ide_ioctl(drive, bdev, cmd, arg); |