Skip to content

Commit 9a3c93a

Browse files
edumazetkuba-moo
authored andcommitted
vlan: use netdev_lockdep_set_classes()
vlan uses vlan_dev_set_lockdep_class() which lacks qdisc_tx_busylock initialization. Use generic netdev_lockdep_set_classes() to not worry anymore. Signed-off-by: Eric Dumazet <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 88c9d07 commit 9a3c93a

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

net/8021q/vlan_dev.c

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -504,28 +504,6 @@ static void vlan_dev_set_rx_mode(struct net_device *vlan_dev)
504504
dev_uc_sync(vlan_dev_priv(vlan_dev)->real_dev, vlan_dev);
505505
}
506506

507-
/*
508-
* vlan network devices have devices nesting below it, and are a special
509-
* "super class" of normal network devices; split their locks off into a
510-
* separate class since they always nest.
511-
*/
512-
static struct lock_class_key vlan_netdev_xmit_lock_key;
513-
static struct lock_class_key vlan_netdev_addr_lock_key;
514-
515-
static void vlan_dev_set_lockdep_one(struct net_device *dev,
516-
struct netdev_queue *txq,
517-
void *unused)
518-
{
519-
lockdep_set_class(&txq->_xmit_lock, &vlan_netdev_xmit_lock_key);
520-
}
521-
522-
static void vlan_dev_set_lockdep_class(struct net_device *dev)
523-
{
524-
lockdep_set_class(&dev->addr_list_lock,
525-
&vlan_netdev_addr_lock_key);
526-
netdev_for_each_tx_queue(dev, vlan_dev_set_lockdep_one, NULL);
527-
}
528-
529507
static __be16 vlan_parse_protocol(const struct sk_buff *skb)
530508
{
531509
struct vlan_ethhdr *veth = (struct vlan_ethhdr *)(skb->data);
@@ -627,7 +605,7 @@ static int vlan_dev_init(struct net_device *dev)
627605

628606
SET_NETDEV_DEVTYPE(dev, &vlan_type);
629607

630-
vlan_dev_set_lockdep_class(dev);
608+
netdev_lockdep_set_classes(dev);
631609

632610
vlan->vlan_pcpu_stats = netdev_alloc_pcpu_stats(struct vlan_pcpu_stats);
633611
if (!vlan->vlan_pcpu_stats)

0 commit comments

Comments
 (0)