Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215462
b: refs/heads/master
c: 6e08bfb
h: refs/heads/master
v: v3
  • Loading branch information
Simon Horman committed Oct 4, 2010
1 parent 9a2a4fe commit df2f99e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f11017ec2d1859c661f4e2b12c4a8d250e1f47cf
refs/heads/master: 6e08bfb879574524cc9a67be960c684989fd986c
13 changes: 4 additions & 9 deletions trunk/net/netfilter/ipvs/ip_vs_ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,7 @@ ip_vs_add_service(struct ip_vs_service_user_kern *u,
if (sched == NULL) {
pr_info("Scheduler module ip_vs_%s not found\n", u->sched_name);
ret = -ENOENT;
goto out_mod_dec;
goto out_err;
}

#ifdef CONFIG_IP_VS_IPV6
Expand Down Expand Up @@ -1204,7 +1204,7 @@ ip_vs_add_service(struct ip_vs_service_user_kern *u,
*svc_p = svc;
return 0;

out_err:
out_err:
if (svc != NULL) {
if (svc->scheduler)
ip_vs_unbind_scheduler(svc);
Expand All @@ -1217,7 +1217,6 @@ ip_vs_add_service(struct ip_vs_service_user_kern *u,
}
ip_vs_scheduler_put(sched);

out_mod_dec:
/* decrease the module use count */
ip_vs_use_count_dec();

Expand Down Expand Up @@ -1300,10 +1299,7 @@ ip_vs_edit_service(struct ip_vs_service *svc, struct ip_vs_service_user_kern *u)
#ifdef CONFIG_IP_VS_IPV6
out:
#endif

if (old_sched)
ip_vs_scheduler_put(old_sched);

ip_vs_scheduler_put(old_sched);
return ret;
}

Expand All @@ -1327,8 +1323,7 @@ static void __ip_vs_del_service(struct ip_vs_service *svc)
/* Unbind scheduler */
old_sched = svc->scheduler;
ip_vs_unbind_scheduler(svc);
if (old_sched)
ip_vs_scheduler_put(old_sched);
ip_vs_scheduler_put(old_sched);

/* Unbind app inc */
if (svc->inc) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/netfilter/ipvs/ip_vs_sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ struct ip_vs_scheduler *ip_vs_scheduler_get(const char *sched_name)

void ip_vs_scheduler_put(struct ip_vs_scheduler *scheduler)
{
if (scheduler->module)
if (scheduler && scheduler->module)
module_put(scheduler->module);
}

Expand Down

0 comments on commit df2f99e

Please sign in to comment.