OpenVZ Forum


Home » Mailing lists » Devel » [RFC PATCH 1/4] namespaces: make get_nsproxy nonstatic
[RFC PATCH 1/4] namespaces: make get_nsproxy nonstatic [message #10218] Mon, 12 February 2007 22:22
serue is currently offline  serue
Messages: 750
Registered: February 2006
Senior Member
From: "Serge E. Hallyn" <serue@us.ibm.com>
Subject: [RFC PATCH 1/4] namespaces: make get_nsproxy nonstatic

We'll need get_nsproxy accessible from containers code, but it is
statically defined in kernel/nsproxy.c. Make it inline in
include/linux/nsproxy.h.

Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>

---

include/linux/nsproxy.h | 5 +++++
kernel/nsproxy.c | 5 -----
2 files changed, 5 insertions(+), 5 deletions(-)

ad2cf2568b8fe9cf094905ec7370149baafc6495
diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h
index c55f20b..0255e27 100644
--- a/include/linux/nsproxy.h
+++ b/include/linux/nsproxy.h
@@ -31,6 +31,11 @@ struct nsproxy {
};
extern struct nsproxy init_nsproxy;

+static inline void get_nsproxy(struct nsproxy *ns)
+{
+ atomic_inc(&ns->count);
+}
+
struct nsproxy *dup_namespaces(struct nsproxy *orig);
int copy_namespaces(int flags, struct task_struct *tsk);
void get_task_namespaces(struct task_struct *tsk);
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
index d174d1f..1123ab2 100644
--- a/kernel/nsproxy.c
+++ b/kernel/nsproxy.c
@@ -23,11 +23,6 @@

struct nsproxy init_nsproxy = INIT_NSPROXY(init_nsproxy);

-static inline void get_nsproxy(struct nsproxy *ns)
-{
- atomic_inc(&ns->count);
-}
-
void get_task_namespaces(struct task_struct *tsk)
{
struct nsproxy *ns = tsk->nsproxy;
--
1.1.6
 
Read Message
Previous Topic: [PATCH 1/1][RFC] EXT34 retry loop issue V(2)
Next Topic: [RFC PATCH 4/4] namespace containers: implement enter into existing container
Goto Forum:
  


Current Time: Fri Jul 25 03:11:21 GMT 2025

Total time taken to generate the page: 0.23188 seconds