diff options
-rw-r--r-- | net/core/dev_addr_lists.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/net/core/dev_addr_lists.c b/net/core/dev_addr_lists.c index 7b39f3ed2fda..e2e66939ed00 100644 --- a/net/core/dev_addr_lists.c +++ b/net/core/dev_addr_lists.c | |||
@@ -68,14 +68,6 @@ static int __hw_addr_add(struct netdev_hw_addr_list *list, unsigned char *addr, | |||
68 | return __hw_addr_add_ex(list, addr, addr_len, addr_type, false); | 68 | return __hw_addr_add_ex(list, addr, addr_len, addr_type, false); |
69 | } | 69 | } |
70 | 70 | ||
71 | static void ha_rcu_free(struct rcu_head *head) | ||
72 | { | ||
73 | struct netdev_hw_addr *ha; | ||
74 | |||
75 | ha = container_of(head, struct netdev_hw_addr, rcu_head); | ||
76 | kfree(ha); | ||
77 | } | ||
78 | |||
79 | static int __hw_addr_del_ex(struct netdev_hw_addr_list *list, | 71 | static int __hw_addr_del_ex(struct netdev_hw_addr_list *list, |
80 | unsigned char *addr, int addr_len, | 72 | unsigned char *addr, int addr_len, |
81 | unsigned char addr_type, bool global) | 73 | unsigned char addr_type, bool global) |
@@ -94,7 +86,7 @@ static int __hw_addr_del_ex(struct netdev_hw_addr_list *list, | |||
94 | if (--ha->refcount) | 86 | if (--ha->refcount) |
95 | return 0; | 87 | return 0; |
96 | list_del_rcu(&ha->list); | 88 | list_del_rcu(&ha->list); |
97 | call_rcu(&ha->rcu_head, ha_rcu_free); | 89 | kfree_rcu(ha, rcu_head); |
98 | list->count--; | 90 | list->count--; |
99 | return 0; | 91 | return 0; |
100 | } | 92 | } |
@@ -197,7 +189,7 @@ void __hw_addr_flush(struct netdev_hw_addr_list *list) | |||
197 | 189 | ||
198 | list_for_each_entry_safe(ha, tmp, &list->list, list) { | 190 | list_for_each_entry_safe(ha, tmp, &list->list, list) { |
199 | list_del_rcu(&ha->list); | 191 | list_del_rcu(&ha->list); |
200 | call_rcu(&ha->rcu_head, ha_rcu_free); | 192 | kfree_rcu(ha, rcu_head); |
201 | } | 193 | } |
202 | list->count = 0; | 194 | list->count = 0; |
203 | } | 195 | } |