ipvs: Wrap sysctl_cache_bypass and remove ifdefs in ip_vs_leave
With sysctl_cache_bypass now a compile time constant the compiler can figue out that it can elimiate all of the code that depends on sysctl_cache_bypass being true. Also remove the duplicate computation of net previously necessitated by #ifdef CONFIG_SYSCTL Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Simon Horman <horms@verge.net.au>
This commit is contained in:

committed by
Simon Horman

szülő
7c08d78e6f
commit
5703294874
@@ -1101,6 +1101,11 @@ static inline int sysctl_ignore_tunneled(struct netns_ipvs *ipvs)
|
||||
return ipvs->sysctl_ignore_tunneled;
|
||||
}
|
||||
|
||||
static inline int sysctl_cache_bypass(struct netns_ipvs *ipvs)
|
||||
{
|
||||
return ipvs->sysctl_cache_bypass;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static inline int sysctl_sync_threshold(struct netns_ipvs *ipvs)
|
||||
@@ -1183,6 +1188,11 @@ static inline int sysctl_ignore_tunneled(struct netns_ipvs *ipvs)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int sysctl_cache_bypass(struct netns_ipvs *ipvs)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* IPVS core functions
|
||||
|
Reference in New Issue
Block a user