diff options
author | Eric Dumazet <edumazet@google.com> | 2022-02-10 05:59:32 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-02-10 18:30:26 +0300 |
commit | ede6c39c4f9068cbeb4036448c45fff5393e0432 (patch) | |
tree | dbeb843af969bdd903410d4ea5351db041893058 /include/net/net_namespace.h | |
parent | ca2d5f1ff05955da9506055e88c4bbb71da190f1 (diff) | |
download | linux-ede6c39c4f9068cbeb4036448c45fff5393e0432.tar.xz |
net: make net->dev_unreg_count atomic
Having to acquire rtnl from netdev_run_todo() for every dismantled
device is not desirable when/if rtnl is under stress.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/net_namespace.h')
-rw-r--r-- | include/net/net_namespace.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 374cc7b260fc..c4f5601f6e32 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h @@ -63,7 +63,7 @@ struct net { */ spinlock_t rules_mod_lock; - unsigned int dev_unreg_count; + atomic_t dev_unreg_count; unsigned int dev_base_seq; /* protected by rtnl_mutex */ int ifindex; |