diff options
author | Eric Dumazet <edumazet@google.com> | 2024-02-13 07:32:43 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-02-14 12:20:14 +0100 |
commit | 2dd4d828d648e101aaf19326afcdfee8667cb185 (patch) | |
tree | 03ec1b818a6a90c41b05d6fa344e8c352c05f758 /net/core | |
parent | net: add netdev_set_operstate() helper (diff) | |
download | linux-2dd4d828d648e101aaf19326afcdfee8667cb185.tar.xz linux-2dd4d828d648e101aaf19326afcdfee8667cb185.zip |
net: remove dev_base_lock from do_setlink()
We hold RTNL here, and dev->link_mode readers already
are using READ_ONCE().
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/rtnetlink.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index e484ba44f23b..39e66bf3e238 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -2961,11 +2961,9 @@ static int do_setlink(const struct sk_buff *skb, if (tb[IFLA_LINKMODE]) { unsigned char value = nla_get_u8(tb[IFLA_LINKMODE]); - write_lock(&dev_base_lock); if (dev->link_mode ^ value) status |= DO_SETLINK_NOTIFY; WRITE_ONCE(dev->link_mode, value); - write_unlock(&dev_base_lock); } if (tb[IFLA_VFINFO_LIST]) { |