summaryrefslogtreecommitdiffstats
path: root/drivers/block/pktcdvd.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-11-28 13:44:48 +0100
committerArnd Bergmann <arnd@arndb.de>2020-01-03 09:33:05 +0100
commitf3ee6e63a9df460963bc51a40891cd9b067404f3 (patch)
treebc0a22af353b3359a300b426464d6cecc3fab52a /drivers/block/pktcdvd.c
parentab0cf1e425eaa25a1ead68edc69d8644dfae7745 (diff)
downloadlinux-f3ee6e63a9df460963bc51a40891cd9b067404f3.tar.bz2
compat_ioctl: move CDROM_SEND_PACKET handling into scsi
There is only one implementation of this ioctl, so move the handling out of the common block layer code into the place where it's actually needed. It also gets called indirectly through pktcdvd, which needs to be aware of this change. As I noticed, the old implementation of the compat handler failed to convert the structure on the way out, so the updated fields never got written back to user space. This is either not important, or it has never worked and should be fixed now. Reviewed-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/block/pktcdvd.c')
-rw-r--r--drivers/block/pktcdvd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 861fc65a1b75..ab4d3be4b646 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -2671,15 +2671,13 @@ static int pkt_compat_ioctl(struct block_device *bdev, fmode_t mode, unsigned in
case CDROMEJECT:
case CDROMMULTISESSION:
case CDROMREADTOCENTRY:
+ case CDROM_SEND_PACKET: /* compat mode handled in scsi_cmd_ioctl */
case SCSI_IOCTL_SEND_COMMAND:
return pkt_ioctl(bdev, mode, cmd, (unsigned long)compat_ptr(arg));
-
/* FIXME: no handler so far */
- case CDROM_LAST_WRITTEN:
- /* handled in compat_blkdev_driver_ioctl */
- case CDROM_SEND_PACKET:
default:
+ case CDROM_LAST_WRITTEN:
return -ENOIOCTLCMD;
}
}