[PATCH 02/33] task containersv11 basic task container framework fix

Previous thread: [PATCH 23/33] memory controller containers setup v7 by Paul Menage on Monday, September 17, 2007 - 5:03 pm. (1 message)

Next thread: [PATCH 06/33] task containersv11 add procfs interface by Paul Menage on Monday, September 17, 2007 - 5:03 pm. (1 message)
To: <akpm@...>, <balbir@...>, Serge E. Hallyn <serue@...>, Cedric Le Goater <clg@...>, Eric W. Biederman <ebiederm@...>, Pavel Emelianov <xemul@...>, David Rientjes <rientjes@...>, Vaidyanathan Srinivasan <svaidy@...>
Cc: Nick Piggin <nickpiggin@...>, Peter Zijlstra <a.p.zijlstra@...>, <pj@...>, <containers@...>, <linux-kernel@...>
Date: Monday, September 17, 2007 - 5:03 pm

Handle reading /proc/self/cpuset when cpusets isn't mounted.

Signed-off-by: Paul Menage <menage@google.com>

---

kernel/cgroup.c | 9 +++++++++
1 file changed, 9 insertions(+)

diff -puN kernel/cgroup.c~task-cgroupsv11-basic-task-cgroup-framework-fix kernel/cgroup.c
--- a/kernel/cgroup.c~task-cgroupsv11-basic-task-cgroup-framework-fix
+++ a/kernel/cgroup.c
@@ -683,6 +683,15 @@ int cgroup_path(const struct containe
{
char *start;

+ if (cont == dummytop) {
+ /*
+ * Inactive subsystems have no dentry for their root
+ * cgroup
+ */
+ strcpy(buf, "/");
+ return 0;
+ }
+
start = buf + buflen;

*--start = '\0';
_

--
-

Previous thread: [PATCH 23/33] memory controller containers setup v7 by Paul Menage on Monday, September 17, 2007 - 5:03 pm. (1 message)

Next thread: [PATCH 06/33] task containersv11 add procfs interface by Paul Menage on Monday, September 17, 2007 - 5:03 pm. (1 message)