aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cpuset.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r--kernel/cpuset.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 67b2bfe27814..3e296ed81d4d 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -2255,13 +2255,14 @@ const struct file_operations proc_cpuset_operations = {
2255#endif /* CONFIG_PROC_PID_CPUSET */ 2255#endif /* CONFIG_PROC_PID_CPUSET */
2256 2256
2257/* Display task cpus_allowed, mems_allowed in /proc/<pid>/status file. */ 2257/* Display task cpus_allowed, mems_allowed in /proc/<pid>/status file. */
2258char *cpuset_task_status_allowed(struct task_struct *task, char *buffer) 2258void cpuset_task_status_allowed(struct seq_file *m, struct task_struct *task)
2259{ 2259{
2260 buffer += sprintf(buffer, "Cpus_allowed:\t"); 2260 seq_printf(m, "Cpus_allowed:\t");
2261 buffer += cpumask_scnprintf(buffer, PAGE_SIZE, task->cpus_allowed); 2261 m->count += cpumask_scnprintf(m->buf + m->count, m->size - m->count,
2262 buffer += sprintf(buffer, "\n"); 2262 task->cpus_allowed);
2263 buffer += sprintf(buffer, "Mems_allowed:\t"); 2263 seq_printf(m, "\n");
2264 buffer += nodemask_scnprintf(buffer, PAGE_SIZE, task->mems_allowed); 2264 seq_printf(m, "Mems_allowed:\t");
2265 buffer += sprintf(buffer, "\n"); 2265 m->count += nodemask_scnprintf(m->buf + m->count, m->size - m->count,
2266 return buffer; 2266 task->mems_allowed);
2267 seq_printf(m, "\n");
2267} 2268}