• Arnd Bergmann's avatar
    compat_ioctl: move tape handling into drivers · 1207045d
    Arnd Bergmann authored
    MTIOCPOS and MTIOCGET are incompatible between 32-bit and 64-bit user
    space, and traditionally have been translated in fs/compat_ioctl.c.
    
    To get rid of that translation handler, move a corresponding
    implementation into each of the four drivers implementing those commands.
    
    The interesting part of that is now in a new linux/mtio.h header that
    wraps the existing uapi/linux/mtio.h header and provides an abstraction
    to let drivers handle both cases easily. Using an in_compat_syscall()
    check, the caller does not have to keep track of whether this was
    called through .unlocked_ioctl() or .compat_ioctl().
    Acked-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
    Cc: "Kai Mäkisara" <Kai.Makisara@kolumbus.fi>
    Cc: linux-scsi@vger.kernel.org
    Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
    Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    1207045d
st.c 131 KB