Commit fa81c0e1d2d2176f1136c72c080c9ea4a98be347
Committed by
Paul E. McKenney
1 parent
10d50e748d
Exists in
master
and in
7 other branches
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>
Showing 1 changed file with 2 additions and 10 deletions Side-by-side Diff
net/core/drop_monitor.c
... | ... | @@ -207,14 +207,6 @@ |
207 | 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 | 210 | static int set_all_monitor_traces(int state) |
219 | 211 | { |
220 | 212 | int rc = 0; |
... | ... | @@ -245,7 +237,7 @@ |
245 | 237 | list_for_each_entry_safe(new_stat, temp, &hw_stats_list, list) { |
246 | 238 | if (new_stat->dev == NULL) { |
247 | 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 | 243 | break; |
... | ... | @@ -314,7 +306,7 @@ |
314 | 306 | new_stat->dev = NULL; |
315 | 307 | if (trace_state == TRACE_OFF) { |
316 | 308 | list_del_rcu(&new_stat->list); |
317 | - call_rcu(&new_stat->rcu, free_dm_hw_stat); | |
309 | + kfree_rcu(new_stat, rcu); | |
318 | 310 | break; |
319 | 311 | } |
320 | 312 | } |