diff options
author | Arnd Bergmann <arnd@arndb.de> | 2019-11-29 11:48:31 +0100 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2020-01-03 09:42:52 +0100 |
commit | 9b81648cb5e3ae7296825f0c8d2f98e50631ee84 (patch) | |
tree | 2a971e392be7ea804073fe035c969bc5f519f2d7 /block/blk-mq.h | |
parent | 5fb889f587fa2ae486e067d8a00df955ae6492b3 (diff) | |
download | lwn-9b81648cb5e3ae7296825f0c8d2f98e50631ee84.tar.gz lwn-9b81648cb5e3ae7296825f0c8d2f98e50631ee84.zip |
compat_ioctl: simplify up block/ioctl.c
Having separate implementations of blkdev_ioctl() often leads to these
getting out of sync, despite the comment at the top.
Since most of the ioctl commands are compatible, and we try very hard
not to add any new incompatible ones, move all the common bits into a
shared function and leave only the ones that are historically different
in separate functions for native/compat mode.
To deal with the compat_ptr() conversion, pass both the integer
argument and the pointer argument into the new blkdev_common_ioctl()
and make sure to always use the correct one of these.
blkdev_ioctl() is now only kept as a separate exported interfact
for drivers/char/raw.c, which lacks a compat_ioctl variant.
We should probably either move raw.c to staging if there are no
more users, or export blkdev_compat_ioctl() as well.
Reviewed-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'block/blk-mq.h')
0 files changed, 0 insertions, 0 deletions