]> git.baikalelectronics.ru Git - kernel.git/commit
compat_ioctl: scsi: move ioctl handling into drivers
authorArnd Bergmann <arnd@arndb.de>
Fri, 15 Mar 2019 16:39:44 +0000 (17:39 +0100)
committerArnd Bergmann <arnd@arndb.de>
Fri, 3 Jan 2020 08:42:32 +0000 (09:42 +0100)
commit40f466ccc5ff306372c20addad769b3aa4e21758
tree4774346fa10a3ced118bf5e8e61b5901b574cffb
parent8ee7c6aea549f516aa1a165f732ea440cbfcc387
compat_ioctl: scsi: move ioctl handling into drivers

Each driver calling scsi_ioctl() gets an equivalent compat_ioctl()
handler that implements the same commands by calling scsi_compat_ioctl().

The scsi_cmd_ioctl() and scsi_cmd_blk_ioctl() functions are compatible
at this point, so any driver that calls those can do so for both native
and compat mode, with the argument passed through compat_ptr().

With this, we can remove the entries from fs/compat_ioctl.c.  The new
code is larger, but should be easier to maintain and keep updated with
newly added commands.

Reviewed-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/block/virtio_blk.c
drivers/scsi/ch.c
drivers/scsi/sd.c
drivers/scsi/sg.c
drivers/scsi/sr.c
drivers/scsi/st.c
fs/compat_ioctl.c