compat_ioctl: move CDROM_SEND_PACKET handling into scsi
authorArnd Bergmann <arnd@arndb.de>
Thu, 28 Nov 2019 12:44:48 +0000 (13:44 +0100)
committerArnd Bergmann <arnd@arndb.de>
Fri, 3 Jan 2020 08:33:05 +0000 (09:33 +0100)
commitf3ee6e63a9df460963bc51a40891cd9b067404f3
treebc0a22af353b3359a300b426464d6cecc3fab52a
parentab0cf1e425eaa25a1ead68edc69d8644dfae7745
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>
block/compat_ioctl.c
block/scsi_ioctl.c
drivers/block/pktcdvd.c