diff options
| author | David S. Miller <[email protected]> | 2018-01-29 15:14:59 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2018-01-29 15:15:51 +0000 |
| commit | 3e3ab9ccca5b50b11bd4d16c2048b667343354bd (patch) | |
| tree | 7279f7401e7cc2b93fb7cb2bff894b5385429a68 /include/net/net_namespace.h | |
| parent | Merge tag 'wireless-drivers-next-for-davem-2018-01-26' of git://git.kernel.or... (diff) | |
| parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff) | |
| download | kernel-3e3ab9ccca5b50b11bd4d16c2048b667343354bd.tar.gz kernel-3e3ab9ccca5b50b11bd4d16c2048b667343354bd.zip | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Signed-off-by: David S. Miller <[email protected]>
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) return net1 == net2; } +static inline int check_net(const struct net *net) +{ + return refcount_read(&net->count) != 0; +} + void net_drop_ns(void *); #else @@ -247,6 +252,11 @@ int net_eq(const struct net *net1, const struct net *net2) return 1; } +static inline int check_net(const struct net *net) +{ + return 1; +} + #define net_drop_ns NULL #endif |
