diff options
author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2011-03-17 23:39:43 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2011-05-08 01:50:59 -0400 |
commit | fa81c0e1d2d2176f1136c72c080c9ea4a98be347 (patch) | |
tree | 0e756edfc1885affc301a390dee25cb93c55e0b9 /net/core/drop_monitor.c | |
parent | 10d50e748d983ff1003e0cf556ea17fa8f32c382 (diff) |
net,rcu: convert call_rcu(free_dm_hw_stat) to kfree_rcu()
The rcu callback free_dm_hw_stat() just calls a kfree(),
so we use kfree_rcu() instead of the call_rcu(free_dm_hw_stat).
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'net/core/drop_monitor.c')
-rw-r--r-- | net/core/drop_monitor.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c index 706502ff64aa..7f36b38e060f 100644 --- a/net/core/drop_monitor.c +++ b/net/core/drop_monitor.c | |||
@@ -207,14 +207,6 @@ static void trace_napi_poll_hit(void *ignore, struct napi_struct *napi) | |||
207 | rcu_read_unlock(); | 207 | rcu_read_unlock(); |
208 | } | 208 | } |
209 | 209 | ||
210 | |||
211 | static void free_dm_hw_stat(struct rcu_head *head) | ||
212 | { | ||
213 | struct dm_hw_stat_delta *n; | ||
214 | n = container_of(head, struct dm_hw_stat_delta, rcu); | ||
215 | kfree(n); | ||
216 | } | ||
217 | |||
218 | static int set_all_monitor_traces(int state) | 210 | static int set_all_monitor_traces(int state) |
219 | { | 211 | { |
220 | int rc = 0; | 212 | int rc = 0; |
@@ -245,7 +237,7 @@ static int set_all_monitor_traces(int state) | |||
245 | list_for_each_entry_safe(new_stat, temp, &hw_stats_list, list) { | 237 | list_for_each_entry_safe(new_stat, temp, &hw_stats_list, list) { |
246 | if (new_stat->dev == NULL) { | 238 | if (new_stat->dev == NULL) { |
247 | list_del_rcu(&new_stat->list); | 239 | list_del_rcu(&new_stat->list); |
248 | call_rcu(&new_stat->rcu, free_dm_hw_stat); | 240 | kfree_rcu(new_stat, rcu); |
249 | } | 241 | } |
250 | } | 242 | } |
251 | break; | 243 | break; |
@@ -314,7 +306,7 @@ static int dropmon_net_event(struct notifier_block *ev_block, | |||
314 | new_stat->dev = NULL; | 306 | new_stat->dev = NULL; |
315 | if (trace_state == TRACE_OFF) { | 307 | if (trace_state == TRACE_OFF) { |
316 | list_del_rcu(&new_stat->list); | 308 | list_del_rcu(&new_stat->list); |
317 | call_rcu(&new_stat->rcu, free_dm_hw_stat); | 309 | kfree_rcu(new_stat, rcu); |
318 | break; | 310 | break; |
319 | } | 311 | } |
320 | } | 312 | } |