diff options
author | Cong Wang <xiyou.wangcong@gmail.com> | 2020-06-26 21:24:22 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-06-29 07:37:23 +0300 |
commit | be74294ffa24f5fbc0d6643842e3e095447e17a2 (patch) | |
tree | 153ca1c3e43edef396381db6091834acc0b31809 /drivers/net/macsec.c | |
parent | 7dea927f702df030c02bd0c9e6e320a8315e3efa (diff) | |
download | linux-be74294ffa24f5fbc0d6643842e3e095447e17a2.tar.xz |
net: get rid of lockdep_set_class_and_subclass()
lockdep_set_class_and_subclass() is meant to reduce
the _nested() annotations by assigning a default subclass.
For addr_list_lock, we have to compute the subclass at
run-time as the netdevice topology changes after creation.
So, we should just get rid of these
lockdep_set_class_and_subclass() and stick with our _nested()
annotations.
Fixes: 845e0ebb4408 ("net: change addr_list_lock back to static key")
Suggested-by: Taehee Yoo <ap420073@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macsec.c')
-rw-r--r-- | drivers/net/macsec.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c index e56547bfdac9..9159846b8b93 100644 --- a/drivers/net/macsec.c +++ b/drivers/net/macsec.c @@ -4052,9 +4052,8 @@ static int macsec_newlink(struct net *net, struct net_device *dev, return err; netdev_lockdep_set_classes(dev); - lockdep_set_class_and_subclass(&dev->addr_list_lock, - &macsec_netdev_addr_lock_key, - dev->lower_level); + lockdep_set_class(&dev->addr_list_lock, + &macsec_netdev_addr_lock_key); err = netdev_upper_dev_link(real_dev, dev, extack); if (err < 0) |