|
21 | 21 | * License. See the file COPYING in the main directory of the Linux |
22 | 22 | * distribution for more details. |
23 | 23 | */ |
24 | | -#include "cgroup-internal.h" |
25 | 24 | #include "cpuset-internal.h" |
26 | 25 |
|
27 | 26 | #include <linux/init.h> |
@@ -4350,50 +4349,6 @@ void cpuset_print_current_mems_allowed(void) |
4350 | 4349 | rcu_read_unlock(); |
4351 | 4350 | } |
4352 | 4351 |
|
4353 | | -#ifdef CONFIG_PROC_PID_CPUSET |
4354 | | -/* |
4355 | | - * proc_cpuset_show() |
4356 | | - * - Print tasks cpuset path into seq_file. |
4357 | | - * - Used for /proc/<pid>/cpuset. |
4358 | | - * - No need to task_lock(tsk) on this tsk->cpuset reference, as it |
4359 | | - * doesn't really matter if tsk->cpuset changes after we read it, |
4360 | | - * and we take cpuset_mutex, keeping cpuset_attach() from changing it |
4361 | | - * anyway. |
4362 | | - */ |
4363 | | -int proc_cpuset_show(struct seq_file *m, struct pid_namespace *ns, |
4364 | | - struct pid *pid, struct task_struct *tsk) |
4365 | | -{ |
4366 | | - char *buf; |
4367 | | - struct cgroup_subsys_state *css; |
4368 | | - int retval; |
4369 | | - |
4370 | | - retval = -ENOMEM; |
4371 | | - buf = kmalloc(PATH_MAX, GFP_KERNEL); |
4372 | | - if (!buf) |
4373 | | - goto out; |
4374 | | - |
4375 | | - rcu_read_lock(); |
4376 | | - spin_lock_irq(&css_set_lock); |
4377 | | - css = task_css(tsk, cpuset_cgrp_id); |
4378 | | - retval = cgroup_path_ns_locked(css->cgroup, buf, PATH_MAX, |
4379 | | - current->nsproxy->cgroup_ns); |
4380 | | - spin_unlock_irq(&css_set_lock); |
4381 | | - rcu_read_unlock(); |
4382 | | - |
4383 | | - if (retval == -E2BIG) |
4384 | | - retval = -ENAMETOOLONG; |
4385 | | - if (retval < 0) |
4386 | | - goto out_free; |
4387 | | - seq_puts(m, buf); |
4388 | | - seq_putc(m, '\n'); |
4389 | | - retval = 0; |
4390 | | -out_free: |
4391 | | - kfree(buf); |
4392 | | -out: |
4393 | | - return retval; |
4394 | | -} |
4395 | | -#endif /* CONFIG_PROC_PID_CPUSET */ |
4396 | | - |
4397 | 4352 | /* Display task mems_allowed in /proc/<pid>/status file. */ |
4398 | 4353 | void cpuset_task_status_allowed(struct seq_file *m, struct task_struct *task) |
4399 | 4354 | { |
|
0 commit comments