git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
PCI: manual for SR-IOV user and driver developer
[safe/jmp/linux-2.6]
/
kernel
/
ns_cgroup.c
diff --git
a/kernel/ns_cgroup.c
b/kernel/ns_cgroup.c
index
aead4d6
..
78bc3fd
100644
(file)
--- a/
kernel/ns_cgroup.c
+++ b/
kernel/ns_cgroup.c
@@
-7,10
+7,12
@@
#include <linux/module.h>
#include <linux/cgroup.h>
#include <linux/fs.h>
#include <linux/module.h>
#include <linux/cgroup.h>
#include <linux/fs.h>
+#include <linux/proc_fs.h>
+#include <linux/slab.h>
+#include <linux/nsproxy.h>
struct ns_cgroup {
struct cgroup_subsys_state css;
struct ns_cgroup {
struct cgroup_subsys_state css;
- spinlock_t lock;
};
struct cgroup_subsys ns_subsys;
};
struct cgroup_subsys ns_subsys;
@@
-22,9
+24,12
@@
static inline struct ns_cgroup *cgroup_to_ns(
struct ns_cgroup, css);
}
struct ns_cgroup, css);
}
-int ns_cgroup_clone(struct task_struct *task)
+int ns_cgroup_clone(struct task_struct *task
, struct pid *pid
)
{
{
- return cgroup_clone(task, &ns_subsys);
+ char name[PROC_NUMBUF];
+
+ snprintf(name, PROC_NUMBUF, "%d", pid_vnr(pid));
+ return cgroup_clone(task, &ns_subsys, name);
}
/*
}
/*
@@
-78,7
+83,6
@@
static struct cgroup_subsys_state *ns_create(struct cgroup_subsys *ss,
ns_cgroup = kzalloc(sizeof(*ns_cgroup), GFP_KERNEL);
if (!ns_cgroup)
return ERR_PTR(-ENOMEM);
ns_cgroup = kzalloc(sizeof(*ns_cgroup), GFP_KERNEL);
if (!ns_cgroup)
return ERR_PTR(-ENOMEM);
- spin_lock_init(&ns_cgroup->lock);
return &ns_cgroup->css;
}
return &ns_cgroup->css;
}