aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ip_vs.h
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2011-08-29 12:40:15 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-10-31 19:32:34 -0400
commit69e7dae4096caeea0a7e2ede376f22a4fdee8456 (patch)
treeeb3ac23820052da46982c1ea1a818fb949d9838f /include/net/ip_vs.h
parent34641c6d003a0a94ccabf78211f42da36799f1a2 (diff)
ip_vs.h: fix implicit use of module_get/module_put from module.h
This file was using the module get/put functions in two simple inline functions. But module_get/put were only within scope because of the implicit presence of module.h being everywhere. Rather than add module.h to another file in include/ -- which is exactly the thing we are trying to avoid, simply convert these one-line functions into a define, as per what was done for the device_schedule_callback() in commit 523ded71de0c5e669733. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'include/net/ip_vs.h')
-rw-r--r--include/net/ip_vs.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 8fa4430f99c1..623916acbf31 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -1126,17 +1126,16 @@ int unregister_ip_vs_pe(struct ip_vs_pe *pe);
1126struct ip_vs_pe *ip_vs_pe_getbyname(const char *name); 1126struct ip_vs_pe *ip_vs_pe_getbyname(const char *name);
1127struct ip_vs_pe *__ip_vs_pe_getbyname(const char *pe_name); 1127struct ip_vs_pe *__ip_vs_pe_getbyname(const char *pe_name);
1128 1128
1129static inline void ip_vs_pe_get(const struct ip_vs_pe *pe) 1129/*
1130{ 1130 * Use a #define to avoid all of module.h just for these trivial ops
1131 if (pe && pe->module) 1131 */
1132#define ip_vs_pe_get(pe) \
1133 if (pe && pe->module) \
1132 __module_get(pe->module); 1134 __module_get(pe->module);
1133}
1134 1135
1135static inline void ip_vs_pe_put(const struct ip_vs_pe *pe) 1136#define ip_vs_pe_put(pe) \
1136{ 1137 if (pe && pe->module) \
1137 if (pe && pe->module)
1138 module_put(pe->module); 1138 module_put(pe->module);
1139}
1140 1139
1141/* 1140/*
1142 * IPVS protocol functions (from ip_vs_proto.c) 1141 * IPVS protocol functions (from ip_vs_proto.c)