mirror of
				https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable.git
				synced 2025-11-04 07:44:51 +10:00 
			
		
		
		
	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>
This commit is contained in:
		
							parent
							
								
									bee95250f0
								
							
						
					
					
						commit
						c5c177b4ac
					
				@ -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 */
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										8
									
								
								include/net/net_ratelimit.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								include/net/net_ratelimit.h
									
									
									
									
									
										Normal file
									
								
							@ -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 */
 | 
			
		||||
@ -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,
 | 
			
		||||
 | 
			
		||||
@ -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>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user