net: make dev_unreg_count global

We can use a global dev_unreg_count counter instead
of a per netns one.

As a bonus we can factorize the changes done on it
for bulk device removals.

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-02 10:11:06 +00:00
committed by David S. Miller
parent 45a96c407e
commit ffabe98cb5
4 changed files with 11 additions and 15 deletions

View File

@@ -67,8 +67,6 @@ struct net {
*/
spinlock_t rules_mod_lock;
atomic_t dev_unreg_count;
unsigned int dev_base_seq; /* protected by rtnl_mutex */
u32 ifindex;