mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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: [email protected] Cc: Jens Axboe <[email protected]> Cc: James Bottomley <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
81d48f0aee
commit
577ebb374c
8 changed files with 18 additions and 12 deletions
|
|
@ -2746,12 +2746,11 @@ int cdrom_ioctl(struct cdrom_device_info *cdi, struct block_device *bdev,
|
|||
{
|
||||
void __user *argp = (void __user *)arg;
|
||||
int ret;
|
||||
struct gendisk *disk = bdev->bd_disk;
|
||||
|
||||
/*
|
||||
* Try the generic SCSI command ioctl's first.
|
||||
*/
|
||||
ret = scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp);
|
||||
ret = scsi_cmd_blk_ioctl(bdev, mode, cmd, argp);
|
||||
if (ret != -ENOTTY)
|
||||
return ret;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue