OpenVZ Forum


Home » Mailing lists » Devel » [RFC] ns containers (v2): namespace entering
[PATCH 1/4] namespaces: make get_nsproxy nonstatic [message #10496 is a reply to message #10495] Mon, 19 February 2007 22:15 Go to previous messageGo to previous message
serue is currently offline  serue
Messages: 750
Registered: February 2006
Senior Member
From: Serge E. Hallyn <serue@us.ibm.com>
Subject: [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
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [RFC][PATCH 6/6]: Enable unsharing pid namespace.
Next Topic: [PATCH 0/2] resource control file system - aka containers on top of nsproxy!
Goto Forum:
  


Current Time: Sun Aug 10 23:29:55 GMT 2025

Total time taken to generate the page: 0.13359 seconds