diff options
-rw-r--r-- | include/net/ip_vs.h | 4 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_ctl.c | 5 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_dh.c | 4 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_lblc.c | 4 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_lblcr.c | 4 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_sched.c | 13 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_sh.c | 4 | ||||
-rw-r--r-- | net/netfilter/ipvs/ip_vs_wrr.c | 4 |
8 files changed, 12 insertions, 30 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 18aeb85079f8..4990de698576 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -806,7 +806,7 @@ struct ip_vs_scheduler { | |||
806 | /* scheduler initializing service */ | 806 | /* scheduler initializing service */ |
807 | int (*init_service)(struct ip_vs_service *svc); | 807 | int (*init_service)(struct ip_vs_service *svc); |
808 | /* scheduling service finish */ | 808 | /* scheduling service finish */ |
809 | int (*done_service)(struct ip_vs_service *svc); | 809 | void (*done_service)(struct ip_vs_service *svc); |
810 | /* scheduler updating service */ | 810 | /* scheduler updating service */ |
811 | int (*update_service)(struct ip_vs_service *svc); | 811 | int (*update_service)(struct ip_vs_service *svc); |
812 | /* dest is linked */ | 812 | /* dest is linked */ |
@@ -1392,7 +1392,7 @@ extern int register_ip_vs_scheduler(struct ip_vs_scheduler *scheduler); | |||
1392 | extern int unregister_ip_vs_scheduler(struct ip_vs_scheduler *scheduler); | 1392 | extern int unregister_ip_vs_scheduler(struct ip_vs_scheduler *scheduler); |
1393 | extern int ip_vs_bind_scheduler(struct ip_vs_service *svc, | 1393 | extern int ip_vs_bind_scheduler(struct ip_vs_service *svc, |
1394 | struct ip_vs_scheduler *scheduler); | 1394 | struct ip_vs_scheduler *scheduler); |
1395 | extern int ip_vs_unbind_scheduler(struct ip_vs_service *svc); | 1395 | extern void ip_vs_unbind_scheduler(struct ip_vs_service *svc); |
1396 | extern struct ip_vs_scheduler *ip_vs_scheduler_get(const char *sched_name); | 1396 | extern struct ip_vs_scheduler *ip_vs_scheduler_get(const char *sched_name); |
1397 | extern void ip_vs_scheduler_put(struct ip_vs_scheduler *scheduler); | 1397 | extern void ip_vs_scheduler_put(struct ip_vs_scheduler *scheduler); |
1398 | extern struct ip_vs_conn * | 1398 | extern struct ip_vs_conn * |
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index 80d366b7daab..d02272685dda 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c | |||
@@ -1334,10 +1334,7 @@ ip_vs_edit_service(struct ip_vs_service *svc, struct ip_vs_service_user_kern *u) | |||
1334 | /* | 1334 | /* |
1335 | * Unbind the old scheduler | 1335 | * Unbind the old scheduler |
1336 | */ | 1336 | */ |
1337 | if ((ret = ip_vs_unbind_scheduler(svc))) { | 1337 | ip_vs_unbind_scheduler(svc); |
1338 | old_sched = sched; | ||
1339 | goto out_unlock; | ||
1340 | } | ||
1341 | 1338 | ||
1342 | /* | 1339 | /* |
1343 | * Bind the new scheduler | 1340 | * Bind the new scheduler |
diff --git a/net/netfilter/ipvs/ip_vs_dh.c b/net/netfilter/ipvs/ip_vs_dh.c index ebe80f44e712..89c27230d93a 100644 --- a/net/netfilter/ipvs/ip_vs_dh.c +++ b/net/netfilter/ipvs/ip_vs_dh.c | |||
@@ -174,7 +174,7 @@ static int ip_vs_dh_init_svc(struct ip_vs_service *svc) | |||
174 | } | 174 | } |
175 | 175 | ||
176 | 176 | ||
177 | static int ip_vs_dh_done_svc(struct ip_vs_service *svc) | 177 | static void ip_vs_dh_done_svc(struct ip_vs_service *svc) |
178 | { | 178 | { |
179 | struct ip_vs_dh_state *s = svc->sched_data; | 179 | struct ip_vs_dh_state *s = svc->sched_data; |
180 | 180 | ||
@@ -185,8 +185,6 @@ static int ip_vs_dh_done_svc(struct ip_vs_service *svc) | |||
185 | kfree_rcu(s, rcu_head); | 185 | kfree_rcu(s, rcu_head); |
186 | IP_VS_DBG(6, "DH hash table (memory=%Zdbytes) released\n", | 186 | IP_VS_DBG(6, "DH hash table (memory=%Zdbytes) released\n", |
187 | sizeof(struct ip_vs_dh_bucket)*IP_VS_DH_TAB_SIZE); | 187 | sizeof(struct ip_vs_dh_bucket)*IP_VS_DH_TAB_SIZE); |
188 | |||
189 | return 0; | ||
190 | } | 188 | } |
191 | 189 | ||
192 | 190 | ||
diff --git a/net/netfilter/ipvs/ip_vs_lblc.c b/net/netfilter/ipvs/ip_vs_lblc.c index b873e177435a..c7ff97895237 100644 --- a/net/netfilter/ipvs/ip_vs_lblc.c +++ b/net/netfilter/ipvs/ip_vs_lblc.c | |||
@@ -388,7 +388,7 @@ static int ip_vs_lblc_init_svc(struct ip_vs_service *svc) | |||
388 | } | 388 | } |
389 | 389 | ||
390 | 390 | ||
391 | static int ip_vs_lblc_done_svc(struct ip_vs_service *svc) | 391 | static void ip_vs_lblc_done_svc(struct ip_vs_service *svc) |
392 | { | 392 | { |
393 | struct ip_vs_lblc_table *tbl = svc->sched_data; | 393 | struct ip_vs_lblc_table *tbl = svc->sched_data; |
394 | 394 | ||
@@ -402,8 +402,6 @@ static int ip_vs_lblc_done_svc(struct ip_vs_service *svc) | |||
402 | kfree_rcu(tbl, rcu_head); | 402 | kfree_rcu(tbl, rcu_head); |
403 | IP_VS_DBG(6, "LBLC hash table (memory=%Zdbytes) released\n", | 403 | IP_VS_DBG(6, "LBLC hash table (memory=%Zdbytes) released\n", |
404 | sizeof(*tbl)); | 404 | sizeof(*tbl)); |
405 | |||
406 | return 0; | ||
407 | } | 405 | } |
408 | 406 | ||
409 | 407 | ||
diff --git a/net/netfilter/ipvs/ip_vs_lblcr.c b/net/netfilter/ipvs/ip_vs_lblcr.c index c22f173d528c..6049b85df41f 100644 --- a/net/netfilter/ipvs/ip_vs_lblcr.c +++ b/net/netfilter/ipvs/ip_vs_lblcr.c | |||
@@ -555,7 +555,7 @@ static int ip_vs_lblcr_init_svc(struct ip_vs_service *svc) | |||
555 | } | 555 | } |
556 | 556 | ||
557 | 557 | ||
558 | static int ip_vs_lblcr_done_svc(struct ip_vs_service *svc) | 558 | static void ip_vs_lblcr_done_svc(struct ip_vs_service *svc) |
559 | { | 559 | { |
560 | struct ip_vs_lblcr_table *tbl = svc->sched_data; | 560 | struct ip_vs_lblcr_table *tbl = svc->sched_data; |
561 | 561 | ||
@@ -569,8 +569,6 @@ static int ip_vs_lblcr_done_svc(struct ip_vs_service *svc) | |||
569 | kfree_rcu(tbl, rcu_head); | 569 | kfree_rcu(tbl, rcu_head); |
570 | IP_VS_DBG(6, "LBLCR hash table (memory=%Zdbytes) released\n", | 570 | IP_VS_DBG(6, "LBLCR hash table (memory=%Zdbytes) released\n", |
571 | sizeof(*tbl)); | 571 | sizeof(*tbl)); |
572 | |||
573 | return 0; | ||
574 | } | 572 | } |
575 | 573 | ||
576 | 574 | ||
diff --git a/net/netfilter/ipvs/ip_vs_sched.c b/net/netfilter/ipvs/ip_vs_sched.c index 7f11d3d37a42..1b715d0caf43 100644 --- a/net/netfilter/ipvs/ip_vs_sched.c +++ b/net/netfilter/ipvs/ip_vs_sched.c | |||
@@ -64,22 +64,17 @@ int ip_vs_bind_scheduler(struct ip_vs_service *svc, | |||
64 | /* | 64 | /* |
65 | * Unbind a service with its scheduler | 65 | * Unbind a service with its scheduler |
66 | */ | 66 | */ |
67 | int ip_vs_unbind_scheduler(struct ip_vs_service *svc) | 67 | void ip_vs_unbind_scheduler(struct ip_vs_service *svc) |
68 | { | 68 | { |
69 | struct ip_vs_scheduler *sched = svc->scheduler; | 69 | struct ip_vs_scheduler *sched = svc->scheduler; |
70 | 70 | ||
71 | if (!sched) | 71 | if (!sched) |
72 | return 0; | 72 | return; |
73 | 73 | ||
74 | if (sched->done_service) { | 74 | if (sched->done_service) |
75 | if (sched->done_service(svc) != 0) { | 75 | sched->done_service(svc); |
76 | pr_err("%s(): done error\n", __func__); | ||
77 | return -EINVAL; | ||
78 | } | ||
79 | } | ||
80 | 76 | ||
81 | svc->scheduler = NULL; | 77 | svc->scheduler = NULL; |
82 | return 0; | ||
83 | } | 78 | } |
84 | 79 | ||
85 | 80 | ||
diff --git a/net/netfilter/ipvs/ip_vs_sh.c b/net/netfilter/ipvs/ip_vs_sh.c index 55e76d8db711..81c1a10c7b49 100644 --- a/net/netfilter/ipvs/ip_vs_sh.c +++ b/net/netfilter/ipvs/ip_vs_sh.c | |||
@@ -187,7 +187,7 @@ static int ip_vs_sh_init_svc(struct ip_vs_service *svc) | |||
187 | } | 187 | } |
188 | 188 | ||
189 | 189 | ||
190 | static int ip_vs_sh_done_svc(struct ip_vs_service *svc) | 190 | static void ip_vs_sh_done_svc(struct ip_vs_service *svc) |
191 | { | 191 | { |
192 | struct ip_vs_sh_state *s = svc->sched_data; | 192 | struct ip_vs_sh_state *s = svc->sched_data; |
193 | 193 | ||
@@ -198,8 +198,6 @@ static int ip_vs_sh_done_svc(struct ip_vs_service *svc) | |||
198 | kfree_rcu(s, rcu_head); | 198 | kfree_rcu(s, rcu_head); |
199 | IP_VS_DBG(6, "SH hash table (memory=%Zdbytes) released\n", | 199 | IP_VS_DBG(6, "SH hash table (memory=%Zdbytes) released\n", |
200 | sizeof(struct ip_vs_sh_bucket)*IP_VS_SH_TAB_SIZE); | 200 | sizeof(struct ip_vs_sh_bucket)*IP_VS_SH_TAB_SIZE); |
201 | |||
202 | return 0; | ||
203 | } | 201 | } |
204 | 202 | ||
205 | 203 | ||
diff --git a/net/netfilter/ipvs/ip_vs_wrr.c b/net/netfilter/ipvs/ip_vs_wrr.c index 98cb05e345c9..a74fd9bab953 100644 --- a/net/netfilter/ipvs/ip_vs_wrr.c +++ b/net/netfilter/ipvs/ip_vs_wrr.c | |||
@@ -129,7 +129,7 @@ static int ip_vs_wrr_init_svc(struct ip_vs_service *svc) | |||
129 | } | 129 | } |
130 | 130 | ||
131 | 131 | ||
132 | static int ip_vs_wrr_done_svc(struct ip_vs_service *svc) | 132 | static void ip_vs_wrr_done_svc(struct ip_vs_service *svc) |
133 | { | 133 | { |
134 | struct ip_vs_wrr_mark *mark = svc->sched_data; | 134 | struct ip_vs_wrr_mark *mark = svc->sched_data; |
135 | 135 | ||
@@ -137,8 +137,6 @@ static int ip_vs_wrr_done_svc(struct ip_vs_service *svc) | |||
137 | * Release the mark variable | 137 | * Release the mark variable |
138 | */ | 138 | */ |
139 | kfree_rcu(mark, rcu_head); | 139 | kfree_rcu(mark, rcu_head); |
140 | |||
141 | return 0; | ||
142 | } | 140 | } |
143 | 141 | ||
144 | 142 | ||