Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215463
b: refs/heads/master
c: 2fabf35
h: refs/heads/master
i:
  215461: 9a2a4fe
  215459: ae77002
  215455: b604efa
v: v3
  • Loading branch information
Simon Horman committed Oct 4, 2010
1 parent df2f99e commit b74c2c2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 23 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: 6e08bfb879574524cc9a67be960c684989fd986c
refs/heads/master: 2fabf35bfcd89445c54cf1e6a5437dd3cf924a92
3 changes: 1 addition & 2 deletions trunk/net/netfilter/ipvs/ip_vs_ctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
23 changes: 3 additions & 20 deletions trunk/net/netfilter/ipvs/ip_vs_sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,6 @@ int ip_vs_bind_scheduler(struct ip_vs_service *svc,
{
int ret;

if (svc == NULL) {
pr_err("%s(): svc arg NULL\n", __func__);
return -EINVAL;
}
if (scheduler == NULL) {
pr_err("%s(): scheduler arg NULL\n", __func__);
return -EINVAL;
}

svc->scheduler = scheduler;

if (scheduler->init_service) {
Expand All @@ -74,18 +65,10 @@ int ip_vs_bind_scheduler(struct ip_vs_service *svc,
*/
int ip_vs_unbind_scheduler(struct ip_vs_service *svc)
{
struct ip_vs_scheduler *sched;
struct ip_vs_scheduler *sched = svc->scheduler;

if (svc == NULL) {
pr_err("%s(): svc arg NULL\n", __func__);
return -EINVAL;
}

sched = svc->scheduler;
if (sched == NULL) {
pr_err("%s(): svc isn't bound\n", __func__);
return -EINVAL;
}
if (!sched)
return 0;

if (sched->done_service) {
if (sched->done_service(svc) != 0) {
Expand Down

0 comments on commit b74c2c2

Please sign in to comment.