]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
net: Kill ratelimit.h dependency in linux/net.h
authorDavid S. Miller <davem@davemloft.net>
Fri, 27 May 2011 17:41:33 +0000 (13:41 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 May 2011 17:41:33 +0000 (13:41 -0400)
Ingo Molnar noticed that we have this unnecessary ratelimit.h
dependency in linux/net.h, which hid compilation problems from
people doing builds only with CONFIG_NET enabled.

Move this stuff out to a seperate net/net_ratelimit.h file and
include that in the only two places where this thing is needed.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Ingo Molnar <mingo@elte.hu>
include/linux/net.h
include/net/net_ratelimit.h [new file with mode: 0644]
net/core/sysctl_net_core.c
net/core/utils.c

index 1da55e9b6f01a9733f38b309e7b282f447764da7..b29923006b11e50b4aac2c99f9a81be14afc7fd1 100644 (file)
@@ -289,11 +289,5 @@ extern int kernel_sock_shutdown(struct socket *sock,
        MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto) \
                     "-type-" __stringify(type))
 
-#ifdef CONFIG_SYSCTL
-#include <linux/sysctl.h>
-#include <linux/ratelimit.h>
-extern struct ratelimit_state net_ratelimit_state;
-#endif
-
 #endif /* __KERNEL__ */
 #endif /* _LINUX_NET_H */
diff --git a/include/net/net_ratelimit.h b/include/net/net_ratelimit.h
new file mode 100644 (file)
index 0000000..7727b42
--- /dev/null
@@ -0,0 +1,8 @@
+#ifndef _LINUX_NET_RATELIMIT_H
+#define _LINUX_NET_RATELIMIT_H
+
+#include <linux/ratelimit.h>
+
+extern struct ratelimit_state net_ratelimit_state;
+
+#endif /* _LINUX_NET_RATELIMIT_H */
index a829e3f60aeb2812a9a4a92e3d5accf3ce128b77..77a65f031488b3f222e13d1f071a2d3f44218c70 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <net/ip.h>
 #include <net/sock.h>
+#include <net/net_ratelimit.h>
 
 #ifdef CONFIG_RPS
 static int rps_sock_flow_sysctl(ctl_table *table, int write,
index 2012bc797f9c32b9a9a2af81fc08768177d86377..386e263f60669a3a25be7e6d8a4361d7ce93161e 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/ratelimit.h>
 
 #include <net/sock.h>
+#include <net/net_ratelimit.h>
 
 #include <asm/byteorder.h>
 #include <asm/system.h>