]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - include/net/net_namespace.h
[NET] NETNS: Omit namespace comparision without CONFIG_NET_NS.
[mirror_ubuntu-bionic-kernel.git] / include / net / net_namespace.h
index 923f2b8b909600b3962035f714308ddc5e8acf9d..f8f3d1a5fc35ec3abeb5739b911769d3c698e603 100644 (file)
@@ -118,6 +118,12 @@ static inline void release_net(struct net *net)
 {
        atomic_dec(&net->use_count);
 }
+
+static inline
+int net_eq(const struct net *net1, const struct net *net2)
+{
+       return net1 == net2;
+}
 #else
 static inline struct net *get_net(struct net *net)
 {
@@ -141,6 +147,12 @@ static inline struct net *maybe_get_net(struct net *net)
 {
        return net;
 }
+
+static inline
+int net_eq(const struct net *net1, const struct net *net2)
+{
+       return 1;
+}
 #endif
 
 #define for_each_net(VAR)                              \