[patch -mm 07/17] nsproxy: make put_nsproxy an extern

clg at fr.ibm.com clg at fr.ibm.com
Tue Dec 5 02:27:59 PST 2006


From: Cedric Le Goater <clg at fr.ibm.com>

This routine will require modifications in the next patches and it
won't be possible to keep it as an inline anymore.

Signed-off-by: Cedric Le Goater <clg at fr.ibm.com>
---
 include/linux/nsproxy.h |    9 +--------
 kernel/nsproxy.c        |    9 ++++++++-
 2 files changed, 9 insertions(+), 9 deletions(-)

Index: 2.6.19-rc6-mm2/include/linux/nsproxy.h
===================================================================
--- 2.6.19-rc6-mm2.orig/include/linux/nsproxy.h
+++ 2.6.19-rc6-mm2/include/linux/nsproxy.h
@@ -40,14 +40,7 @@ extern struct nsproxy init_nsproxy;
 extern struct nsproxy *dup_namespaces(struct nsproxy *orig);
 extern int copy_namespaces(int flags, struct task_struct *tsk);
 extern void get_task_namespaces(struct task_struct *tsk);
-extern void free_nsproxy(struct nsproxy *ns);
-
-static inline void put_nsproxy(struct nsproxy *ns)
-{
-	if (atomic_dec_and_test(&ns->count)) {
-		free_nsproxy(ns);
-	}
-}
+extern void put_nsproxy(struct nsproxy *ns);
 
 extern void exit_task_namespaces(struct task_struct *p);
 
Index: 2.6.19-rc6-mm2/kernel/nsproxy.c
===================================================================
--- 2.6.19-rc6-mm2.orig/kernel/nsproxy.c
+++ 2.6.19-rc6-mm2/kernel/nsproxy.c
@@ -167,7 +167,7 @@ out_ns:
 	goto out;
 }
 
-void free_nsproxy(struct nsproxy *ns)
+static void free_nsproxy(struct nsproxy *ns)
 {
 	if (ns->mnt_ns)
 		put_mnt_ns(ns->mnt_ns);
@@ -183,3 +183,10 @@ void free_nsproxy(struct nsproxy *ns)
 		put_user_ns(ns->user_ns);
 	kfree(ns);
 }
+
+void put_nsproxy(struct nsproxy *ns)
+{
+	if (atomic_dec_and_test(&ns->count)) {
+		free_nsproxy(ns);
+	}
+}

-- 



More information about the Containers mailing list