diff options
author | David S. Miller <davem@davemloft.net> | 2018-01-29 10:14:59 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-29 10:15:51 -0500 |
commit | 3e3ab9ccca5b50b11bd4d16c2048b667343354bd (patch) | |
tree | 7279f7401e7cc2b93fb7cb2bff894b5385429a68 /include/net/net_namespace.h | |
parent | 868c36dcc949c26bc74fa4661b670d9acc6489e4 (diff) | |
parent | ba804bb4b72e57374b5f567b783aa0298fba0ce6 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
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 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index f8a84a2c2341..f306b2aa15a4 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -223,6 +223,11 @@ int net_eq(const struct net *net1, const struct net *net2) | |||
223 | return net1 == net2; | 223 | return net1 == net2; |
224 | } | 224 | } |
225 | 225 | ||
226 | static inline int check_net(const struct net *net) | ||
227 | { | ||
228 | return refcount_read(&net->count) != 0; | ||
229 | } | ||
230 | |||
226 | void net_drop_ns(void *); | 231 | void net_drop_ns(void *); |
227 | 232 | ||
228 | #else | 233 | #else |
@@ -247,6 +252,11 @@ int net_eq(const struct net *net1, const struct net *net2) | |||
247 | return 1; | 252 | return 1; |
248 | } | 253 | } |
249 | 254 | ||
255 | static inline int check_net(const struct net *net) | ||
256 | { | ||
257 | return 1; | ||
258 | } | ||
259 | |||
250 | #define net_drop_ns NULL | 260 | #define net_drop_ns NULL |
251 | #endif | 261 | #endif |
252 | 262 | ||