aboutsummaryrefslogtreecommitdiff
path: root/net/ipv4/ipvs/ip_vs_est.c
diff options
context:
space:
mode:
authorSimon Horman <horms@verge.net.au>2008-08-27 15:11:37 +1000
committerSimon Horman <horms@verge.net.au>2008-08-27 15:11:37 +1000
commit7fd106785104fa19709fa136abb64c7a9d5db285 (patch)
tree6002ff3d19af60a5d56faad0276da52fb03174b1 /net/ipv4/ipvs/ip_vs_est.c
parenta4356b2920fd4861dd6c75f558749fa5c38a00e8 (diff)
parente3c2ced8d21410e8bc897480081e2ffc516c0f70 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/lvs-2.6 into lvs-next-2.6
Diffstat (limited to 'net/ipv4/ipvs/ip_vs_est.c')
-rw-r--r--net/ipv4/ipvs/ip_vs_est.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/net/ipv4/ipvs/ip_vs_est.c b/net/ipv4/ipvs/ip_vs_est.c
index 5a20f93bd7f..4fb620ec208 100644
--- a/net/ipv4/ipvs/ip_vs_est.c
+++ b/net/ipv4/ipvs/ip_vs_est.c
@@ -124,8 +124,6 @@ void ip_vs_new_estimator(struct ip_vs_stats *stats)
est->outbps = stats->outbps<<5;
spin_lock_bh(&est_lock);
- if (list_empty(&est_list))
- mod_timer(&est_timer, jiffies + 2 * HZ);
list_add(&est->list, &est_list);
spin_unlock_bh(&est_lock);
}
@@ -136,11 +134,6 @@ void ip_vs_kill_estimator(struct ip_vs_stats *stats)
spin_lock_bh(&est_lock);
list_del(&est->list);
- while (list_empty(&est_list) && try_to_del_timer_sync(&est_timer) < 0) {
- spin_unlock_bh(&est_lock);
- cpu_relax();
- spin_lock_bh(&est_lock);
- }
spin_unlock_bh(&est_lock);
}
@@ -160,3 +153,14 @@ void ip_vs_zero_estimator(struct ip_vs_stats *stats)
est->inbps = 0;
est->outbps = 0;
}
+
+int __init ip_vs_estimator_init(void)
+{
+ mod_timer(&est_timer, jiffies + 2 * HZ);
+ return 0;
+}
+
+void ip_vs_estimator_cleanup(void)
+{
+ del_timer_sync(&est_timer);
+}