[RFC v2 01/04] net: make net_create() globally visible

From: Vasiliy Kulikov
Date: Sun Jun 12 2011 - 10:57:13 EST


Make net_create() visible outside of net/core/net_namespace.c to be able
to create additional network namespaces inside of fs/proc/proc_net.c.

Signed-off-by: Vasiliy Kulikov <segoon@xxxxxxxxxxxx>
---
include/net/net_namespace.h | 2 ++
net/core/net_namespace.c | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 1bf812b..d40c61c 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -113,6 +113,8 @@ static inline struct net *copy_net_ns(unsigned long flags, struct net *net_ns)
}
#endif /* CONFIG_NET */

+extern struct net *net_create(void);
+

extern struct list_head net_namespace_list;

diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 3f86026..c7c7310 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -216,7 +216,7 @@ static void net_free(struct net *net)
kmem_cache_free(net_cachep, net);
}

-static struct net *net_create(void)
+struct net *net_create(void)
{
struct net *net;
int rv;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/