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>
This commit is contained in:
Eric Dumazet 2024-02-13 06:32:43 +00:00 committed by David S. Miller
parent 6a2968ee1e
commit 2dd4d828d6

@ -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]) {