]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/net/net_namespace.h
Merge branch 'linus' into core/printk
[linux-2.6-omap-h63xx.git] / include / net / net_namespace.h
index aa540e6be502b49c5b7322e6ee57f630e6fa584a..d9dd0f7072969d7407c145f96d54d82a51c00d7a 100644 (file)
@@ -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;