projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a14a31
)
ipvs: No need to zero out ip_vs_stats during initialization
author
Sven Wegener
<
[email protected]
>
Sun, 10 Aug 2008 18:24:41 +0000
(18:24 +0000)
committer
Sven Wegener
<
[email protected]
>
Mon, 11 Aug 2008 12:00:46 +0000
(14:00 +0200)
It's a global variable and automatically initialized to zero. And now we can
also initialize the lock at compile time.
Signed-off-by: Sven Wegener <
[email protected]
>
Acked-by: Simon Horman <
[email protected]
>
net/ipv4/ipvs/ip_vs_ctl.c
patch
|
blob
|
history
diff --git
a/net/ipv4/ipvs/ip_vs_ctl.c
b/net/ipv4/ipvs/ip_vs_ctl.c
index d651bce054931d45bb64e75bfd3a74b5c503db43..cfb1d20993d1d412042a61501d73b57c27f3d8af 100644
(file)
--- a/
net/ipv4/ipvs/ip_vs_ctl.c
+++ b/
net/ipv4/ipvs/ip_vs_ctl.c
@@
-1784,7
+1784,9
@@
static const struct file_operations ip_vs_info_fops = {
#endif
-struct ip_vs_stats ip_vs_stats;
+struct ip_vs_stats ip_vs_stats = {
+ .lock = __SPIN_LOCK_UNLOCKED(ip_vs_stats.lock),
+};
#ifdef CONFIG_PROC_FS
static int ip_vs_stats_show(struct seq_file *seq, void *v)
@@
-2333,8
+2335,6
@@
int __init ip_vs_control_init(void)
INIT_LIST_HEAD(&ip_vs_rtable[idx]);
}
- memset(&ip_vs_stats, 0, sizeof(ip_vs_stats));
- spin_lock_init(&ip_vs_stats.lock);
ip_vs_new_estimator(&ip_vs_stats);
/* Hook the defense timer */