summaryrefslogtreecommitdiff
path: root/include/net/net_namespace.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2025-03-04 11:19:21 +0100
committerIngo Molnar <mingo@kernel.org>2025-03-04 11:19:21 +0100
commitcfdaa618defc5ebe1ee6aa5bd40a7ccedffca6de (patch)
treefba004535821850f0d10cc4deac3885545083f0c /include/net/net_namespace.h
parentad546940b5991d3e141238cd80a6d1894b767184 (diff)
parent4f2a0b765c9731d2fa94e209ee9ae0e96b280f17 (diff)
Merge branch 'x86/cpu' into x86/asm, to pick up dependent commits
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/net/net_namespace.h')
-rw-r--r--include/net/net_namespace.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 7ba1402ca779..f467a66abc6b 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -297,6 +297,7 @@ static inline int check_net(const struct net *net)
}
void net_drop_ns(void *);
+void net_passive_dec(struct net *net);
#else
@@ -326,8 +327,18 @@ static inline int check_net(const struct net *net)
}
#define net_drop_ns NULL
+
+static inline void net_passive_dec(struct net *net)
+{
+ refcount_dec(&net->passive);
+}
#endif
+static inline void net_passive_inc(struct net *net)
+{
+ refcount_inc(&net->passive);
+}
+
/* Returns true if the netns initialization is completed successfully */
static inline bool net_initialized(const struct net *net)
{