summaryrefslogtreecommitdiffstats
path: root/drivers/net/macvlan.c
diff options
context:
space:
mode:
authorGao Feng <fgao@ikuai8.com>2016-12-06 23:23:18 -0500
committerDavid S. Miller <davem@davemloft.net>2016-12-07 13:22:07 -0500
commita1f5315ce4e1700e65255c617561aa7d8f09a729 (patch)
tree304b54f3fc2e758343c65c96f56b1c5642c166f1 /drivers/net/macvlan.c
parent48140a210b450db229cc9dd927480f65537dc7eb (diff)
driver: macvlan: Remove the rcu member of macvlan_port
When free macvlan_port in macvlan_port_destroy, it is safe to free directly because netdev_rx_handler_unregister could enforce one grace period. So it is unnecessary to use kfree_rcu for macvlan_port. Signed-off-by: Gao Feng <fgao@ikuai8.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macvlan.c')
-rw-r--r--drivers/net/macvlan.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 3c0a1714977b..20b3fdf282c5 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -43,7 +43,6 @@ struct macvlan_port {
43 struct net_device *dev; 43 struct net_device *dev;
44 struct hlist_head vlan_hash[MACVLAN_HASH_SIZE]; 44 struct hlist_head vlan_hash[MACVLAN_HASH_SIZE];
45 struct list_head vlans; 45 struct list_head vlans;
46 struct rcu_head rcu;
47 struct sk_buff_head bc_queue; 46 struct sk_buff_head bc_queue;
48 struct work_struct bc_work; 47 struct work_struct bc_work;
49 bool passthru; 48 bool passthru;
@@ -1151,7 +1150,7 @@ static void macvlan_port_destroy(struct net_device *dev)
1151 cancel_work_sync(&port->bc_work); 1150 cancel_work_sync(&port->bc_work);
1152 __skb_queue_purge(&port->bc_queue); 1151 __skb_queue_purge(&port->bc_queue);
1153 1152
1154 kfree_rcu(port, rcu); 1153 kfree(port);
1155} 1154}
1156 1155
1157static int macvlan_validate(struct nlattr *tb[], struct nlattr *data[]) 1156static int macvlan_validate(struct nlattr *tb[], struct nlattr *data[])