diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-07-07 22:21:34 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-07-07 22:21:34 +0100 |
commit | fa6868508a0102b150ca03d976e3a1c234e4e387 (patch) | |
tree | 2b252f262695544e5caeb2bd983f8cac5158a8f6 /include/net/net_namespace.h | |
parent | 5b2353859f87748f0707cec57c3953022a3321f3 (diff) | |
parent | 4ed47896935573c8423d05bddda3f269d6e6c613 (diff) |
Merge branch 'machtypes' into orion
Diffstat (limited to 'include/net/net_namespace.h')
-rw-r--r-- | include/net/net_namespace.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index aa540e6be50..d9dd0f70729 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h @@ -95,6 +95,11 @@ extern struct list_head net_namespace_list; #ifdef CONFIG_NET_NS extern void __put_net(struct net *net); +static inline int net_alive(struct net *net) +{ + return net && atomic_read(&net->count); +} + static inline struct net *get_net(struct net *net) { atomic_inc(&net->count); @@ -125,6 +130,12 @@ int net_eq(const struct net *net1, const struct net *net2) return net1 == net2; } #else + +static inline int net_alive(struct net *net) +{ + return 1; +} + static inline struct net *get_net(struct net *net) { return net; |