]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: Add net_passive_inc() and net_passive_dec().
authorKuniyuki Iwashima <kuniyu@amazon.com>
Mon, 17 Feb 2025 19:11:27 +0000 (11:11 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 19 Feb 2025 02:33:29 +0000 (18:33 -0800)
commite57a6320215c3967f51ab0edeff87db2095440e4
tree8e6775ea09f53dfce1e7fbca09991804c05aba65
parentf6093c5ec74d5cc495f89bd359253d9c738d04d9
net: Add net_passive_inc() and net_passive_dec().

net_drop_ns() is NULL when CONFIG_NET_NS is disabled.

The next patch introduces a function that increments
and decrements net->passive.

As a prep, let's rename and export net_free() to
net_passive_dec() and add net_passive_inc().

Suggested-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/netdev/CANn89i+oUCt2VGvrbrweniTendZFEh+nwS=uonc004-aPkWy-Q@mail.gmail.com/
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250217191129.19967-2-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/net_namespace.h
net/core/net_namespace.c