]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
compat_ioctl: move SIOCOUTQ out of compat_ioctl.c
authorArnd Bergmann <arnd@arndb.de>
Mon, 3 Jun 2019 21:07:12 +0000 (23:07 +0200)
committerArnd Bergmann <arnd@arndb.de>
Wed, 23 Oct 2019 15:23:46 +0000 (17:23 +0200)
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>
drivers/tty/tty_io.c
fs/compat_ioctl.c
net/socket.c

index 802c1210558f20719804c531a0247eb24a427767..c09691b20a251e2b1183fbee93a8390729167977 100644 (file)
@@ -2755,6 +2755,7 @@ static long tty_compat_ioctl(struct file *file, unsigned int cmd,
        int retval = -ENOIOCTLCMD;
 
        switch (cmd) {
+       case TIOCOUTQ:
        case TIOCSTI:
        case TIOCGWINSZ:
        case TIOCSWINSZ:
index f279e77df2561cf89fa34fad9b4f19b1c987f8ef..d537888f36608186fd757c4ec9f483f1349461e8 100644 (file)
@@ -198,8 +198,6 @@ static int ppp_scompress(struct file *file, unsigned int cmd,
 
 #define COMPATIBLE_IOCTL(cmd) XFORM((u32)cmd),
 static unsigned int ioctl_pointer[] = {
-/* Little t */
-COMPATIBLE_IOCTL(TIOCOUTQ)
 #ifdef CONFIG_BLOCK
 /* Big S */
 COMPATIBLE_IOCTL(SCSI_IOCTL_GET_IDLUN)
index a60f48ab2130da1c1681b2e887f6e2caf58da6f0..371999a024fa3fef613945756e6f2c58ea3d1d48 100644 (file)
 #include <linux/if_tun.h>
 #include <linux/ipv6_route.h>
 #include <linux/route.h>
+#include <linux/termios.h>
 #include <linux/sockios.h>
 #include <net/busy_poll.h>
 #include <linux/errqueue.h>
@@ -3452,6 +3453,7 @@ static int compat_sock_ioctl_trans(struct file *file, struct socket *sock,
        case SIOCSARP:
        case SIOCGARP:
        case SIOCDARP:
+       case SIOCOUTQ:
        case SIOCOUTQNSD:
        case SIOCATMARK:
                return sock_do_ioctl(net, sock, cmd, arg);