diff options
author | Arvid Brodin <arvid.brodin@alten.se> | 2014-07-04 17:35:47 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-08 14:35:30 -0400 |
commit | abff7162765cd66ab109c97fd433ef1f39299120 (patch) | |
tree | 4d7f1547bf99ac7a0e9a68556b8d74550ba26d0d /net/hsr/hsr_main.c | |
parent | 81ba6afd6e6443d2bf4bf40f16df1f1f91c603f8 (diff) |
net/hsr: Move to per-hsr device prune timer.
Signed-off-by: Arvid Brodin <arvid.brodin@alten.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/hsr/hsr_main.c')
-rw-r--r-- | net/hsr/hsr_main.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/net/hsr/hsr_main.c b/net/hsr/hsr_main.c index bcda901437bc..5f9cd7fdbd93 100644 --- a/net/hsr/hsr_main.c +++ b/net/hsr/hsr_main.c | |||
@@ -175,22 +175,6 @@ static int hsr_netdev_notify(struct notifier_block *nb, unsigned long event, | |||
175 | } | 175 | } |
176 | 176 | ||
177 | 177 | ||
178 | static struct timer_list prune_timer; | ||
179 | |||
180 | static void prune_nodes_all(unsigned long data) | ||
181 | { | ||
182 | struct hsr_priv *hsr; | ||
183 | |||
184 | rcu_read_lock(); | ||
185 | list_for_each_entry_rcu(hsr, &hsr_list, hsr_list) | ||
186 | hsr_prune_nodes(hsr); | ||
187 | rcu_read_unlock(); | ||
188 | |||
189 | prune_timer.expires = jiffies + msecs_to_jiffies(PRUNE_PERIOD); | ||
190 | add_timer(&prune_timer); | ||
191 | } | ||
192 | |||
193 | |||
194 | static struct notifier_block hsr_nb = { | 178 | static struct notifier_block hsr_nb = { |
195 | .notifier_call = hsr_netdev_notify, /* Slave event notifications */ | 179 | .notifier_call = hsr_netdev_notify, /* Slave event notifications */ |
196 | }; | 180 | }; |
@@ -202,14 +186,7 @@ static int __init hsr_init(void) | |||
202 | 186 | ||
203 | BUILD_BUG_ON(sizeof(struct hsr_tag) != HSR_HLEN); | 187 | BUILD_BUG_ON(sizeof(struct hsr_tag) != HSR_HLEN); |
204 | 188 | ||
205 | init_timer(&prune_timer); | ||
206 | prune_timer.function = prune_nodes_all; | ||
207 | prune_timer.data = 0; | ||
208 | prune_timer.expires = jiffies + msecs_to_jiffies(PRUNE_PERIOD); | ||
209 | add_timer(&prune_timer); | ||
210 | |||
211 | register_netdevice_notifier(&hsr_nb); | 189 | register_netdevice_notifier(&hsr_nb); |
212 | |||
213 | res = hsr_netlink_init(); | 190 | res = hsr_netlink_init(); |
214 | 191 | ||
215 | return res; | 192 | return res; |
@@ -218,7 +195,6 @@ static int __init hsr_init(void) | |||
218 | static void __exit hsr_exit(void) | 195 | static void __exit hsr_exit(void) |
219 | { | 196 | { |
220 | unregister_netdevice_notifier(&hsr_nb); | 197 | unregister_netdevice_notifier(&hsr_nb); |
221 | del_timer_sync(&prune_timer); | ||
222 | hsr_netlink_exit(); | 198 | hsr_netlink_exit(); |
223 | } | 199 | } |
224 | 200 | ||