aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cpuset.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r--kernel/cpuset.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 3e991c0c02e2..1535af3a912d 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -50,7 +50,6 @@
50#include <linux/time.h> 50#include <linux/time.h>
51#include <linux/backing-dev.h> 51#include <linux/backing-dev.h>
52#include <linux/sort.h> 52#include <linux/sort.h>
53#include <linux/task_ref.h>
54 53
55#include <asm/uaccess.h> 54#include <asm/uaccess.h>
56#include <asm/atomic.h> 55#include <asm/atomic.h>
@@ -2443,7 +2442,7 @@ void __cpuset_memory_pressure_bump(void)
2443 */ 2442 */
2444static int proc_cpuset_show(struct seq_file *m, void *v) 2443static int proc_cpuset_show(struct seq_file *m, void *v)
2445{ 2444{
2446 struct task_ref *tref; 2445 struct pid *pid;
2447 struct task_struct *tsk; 2446 struct task_struct *tsk;
2448 char *buf; 2447 char *buf;
2449 int retval; 2448 int retval;
@@ -2454,8 +2453,8 @@ static int proc_cpuset_show(struct seq_file *m, void *v)
2454 goto out; 2453 goto out;
2455 2454
2456 retval = -ESRCH; 2455 retval = -ESRCH;
2457 tref = m->private; 2456 pid = m->private;
2458 tsk = get_tref_task(tref); 2457 tsk = get_pid_task(pid, PIDTYPE_PID);
2459 if (!tsk) 2458 if (!tsk)
2460 goto out_free; 2459 goto out_free;
2461 2460
@@ -2478,8 +2477,8 @@ out:
2478 2477
2479static int cpuset_open(struct inode *inode, struct file *file) 2478static int cpuset_open(struct inode *inode, struct file *file)
2480{ 2479{
2481 struct task_ref *tref = PROC_I(inode)->tref; 2480 struct pid *pid = PROC_I(inode)->pid;
2482 return single_open(file, proc_cpuset_show, tref); 2481 return single_open(file, proc_cpuset_show, pid);
2483} 2482}
2484 2483
2485struct file_operations proc_cpuset_operations = { 2484struct file_operations proc_cpuset_operations = {