compat_ioctl: move SIOCOUTQ out of compat_ioctl.c

All users of this call are in socket or tty code, so handling
it there means we can avoid the table entry in fs/compat_ioctl.c.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Eric Dumazet <edumazet@google.com>
Cc: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2019-06-03 23:07:12 +02:00
parent 9d7bf41faf
commit c7dc504e2f
3 changed files with 3 additions and 2 deletions

View File

@ -2755,6 +2755,7 @@ static long tty_compat_ioctl(struct file *file, unsigned int cmd,
int retval = -ENOIOCTLCMD; int retval = -ENOIOCTLCMD;
switch (cmd) { switch (cmd) {
case TIOCOUTQ:
case TIOCSTI: case TIOCSTI:
case TIOCGWINSZ: case TIOCGWINSZ:
case TIOCSWINSZ: case TIOCSWINSZ:

View File

@ -198,8 +198,6 @@ static int ppp_scompress(struct file *file, unsigned int cmd,
#define COMPATIBLE_IOCTL(cmd) XFORM((u32)cmd), #define COMPATIBLE_IOCTL(cmd) XFORM((u32)cmd),
static unsigned int ioctl_pointer[] = { static unsigned int ioctl_pointer[] = {
/* Little t */
COMPATIBLE_IOCTL(TIOCOUTQ)
#ifdef CONFIG_BLOCK #ifdef CONFIG_BLOCK
/* Big S */ /* Big S */
COMPATIBLE_IOCTL(SCSI_IOCTL_GET_IDLUN) COMPATIBLE_IOCTL(SCSI_IOCTL_GET_IDLUN)

View File

@ -100,6 +100,7 @@
#include <linux/if_tun.h> #include <linux/if_tun.h>
#include <linux/ipv6_route.h> #include <linux/ipv6_route.h>
#include <linux/route.h> #include <linux/route.h>
#include <linux/termios.h>
#include <linux/sockios.h> #include <linux/sockios.h>
#include <net/busy_poll.h> #include <net/busy_poll.h>
#include <linux/errqueue.h> #include <linux/errqueue.h>
@ -3452,6 +3453,7 @@ static int compat_sock_ioctl_trans(struct file *file, struct socket *sock,
case SIOCSARP: case SIOCSARP:
case SIOCGARP: case SIOCGARP:
case SIOCDARP: case SIOCDARP:
case SIOCOUTQ:
case SIOCOUTQNSD: case SIOCOUTQNSD:
case SIOCATMARK: case SIOCATMARK:
return sock_do_ioctl(net, sock, cmd, arg); return sock_do_ioctl(net, sock, cmd, arg);