summaryrefslogtreecommitdiffstats
path: root/net/netfilter/ipvs/ip_vs_ctl.c
diff options
context:
space:
mode:
authorSimon Horman2010-08-22 14:37:52 +0200
committerSimon Horman2010-10-04 15:45:24 +0200
commit2fabf35bfcd89445c54cf1e6a5437dd3cf924a92 (patch)
treeac44075362b3b17d25f841c50622c0603fc2d3c8 /net/netfilter/ipvs/ip_vs_ctl.c
parentIPVS: Allow null argument to ip_vs_scheduler_put() (diff)
downloadkernel-qcow2-linux-2fabf35bfcd89445c54cf1e6a5437dd3cf924a92.tar.gz
kernel-qcow2-linux-2fabf35bfcd89445c54cf1e6a5437dd3cf924a92.tar.xz
kernel-qcow2-linux-2fabf35bfcd89445c54cf1e6a5437dd3cf924a92.zip
IPVS: ip_vs_{un,}bind_scheduler NULL arguments
In general NULL arguments aren't passed by the few callers that exist, so don't test for them. The exception is to make passing NULL to ip_vs_unbind_scheduler() a noop. Signed-off-by: Simon Horman <horms@verge.net.au> Acked-by: Julian Anastasov <ja@ssi.bg>
Diffstat (limited to 'net/netfilter/ipvs/ip_vs_ctl.c')
-rw-r--r--net/netfilter/ipvs/ip_vs_ctl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index f7afcfe4dbc5..5f20caf47a1d 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -1206,8 +1206,7 @@ ip_vs_add_service(struct ip_vs_service_user_kern *u,
out_err:
if (svc != NULL) {
- if (svc->scheduler)
- ip_vs_unbind_scheduler(svc);
+ ip_vs_unbind_scheduler(svc);
if (svc->inc) {
local_bh_disable();
ip_vs_app_inc_put(svc->inc);