diff options
author | David S. Miller <davem@davemloft.net> | 2011-05-27 13:41:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-27 13:41:33 -0400 |
commit | c5c177b4aca83338781e72be2e6dd1601c560cb3 (patch) | |
tree | b3640c3100d491d9c14fb677ced3a0e4dd780c6f /include | |
parent | bee95250f015ffc3a6efb99516489e70d1b52da2 (diff) |
net: Kill ratelimit.h dependency in linux/net.h
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/net.h | 6 | ||||
-rw-r--r-- | include/net/net_ratelimit.h | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/include/linux/net.h b/include/linux/net.h index 1da55e9b6f01..b29923006b11 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -289,11 +289,5 @@ extern int kernel_sock_shutdown(struct socket *sock, | |||
289 | MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto) \ | 289 | MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto) \ |
290 | "-type-" __stringify(type)) | 290 | "-type-" __stringify(type)) |
291 | 291 | ||
292 | #ifdef CONFIG_SYSCTL | ||
293 | #include <linux/sysctl.h> | ||
294 | #include <linux/ratelimit.h> | ||
295 | extern struct ratelimit_state net_ratelimit_state; | ||
296 | #endif | ||
297 | |||
298 | #endif /* __KERNEL__ */ | 292 | #endif /* __KERNEL__ */ |
299 | #endif /* _LINUX_NET_H */ | 293 | #endif /* _LINUX_NET_H */ |
diff --git a/include/net/net_ratelimit.h b/include/net/net_ratelimit.h new file mode 100644 index 000000000000..7727b4247daf --- /dev/null +++ b/include/net/net_ratelimit.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef _LINUX_NET_RATELIMIT_H | ||
2 | #define _LINUX_NET_RATELIMIT_H | ||
3 | |||
4 | #include <linux/ratelimit.h> | ||
5 | |||
6 | extern struct ratelimit_state net_ratelimit_state; | ||
7 | |||
8 | #endif /* _LINUX_NET_RATELIMIT_H */ | ||