Signed-off-by: Eric W. Biederman <[email protected]>
---
fs/ioprio.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
42c8b99a7c1417f8fc587f86c218a0be10ec27d0
diff --git a/fs/ioprio.c b/fs/ioprio.c
index ca77008..008301b 100644
--- a/fs/ioprio.c
+++ b/fs/ioprio.c
@@ -24,6 +24,7 @@
#include <linux/blkdev.h>
#include <linux/capability.h>
#include <linux/syscalls.h>
+#include <linux/pspace.h>
static int set_task_ioprio(struct task_struct *task, int ioprio)
{
@@ -78,18 +79,18 @@ asmlinkage long sys_ioprio_set(int which
if (!who)
p = current;
else
- p = find_task_by_pid(who);
+ p = find_task_by_pid(current->pspace, who);
if (p)
ret = set_task_ioprio(p, ioprio);
break;
case IOPRIO_WHO_PGRP:
if (!who)
who = process_group(current);
- do_each_task_pid(who, PIDTYPE_PGID, p) {
+ do_each_task_pid(current->pspace, who, PIDTYPE_PGID, p) {
ret = set_task_ioprio(p, ioprio);
if (ret)
break;
- } while_each_task_pid(who, PIDTYPE_PGID, p);
+ } while_each_task_pid(current->pspace, who, PIDTYPE_PGID, p);
break;
case IOPRIO_WHO_USER:
if (!who)
@@ -131,19 +132,19 @@ asmlinkage long sys_ioprio_get(int which
if (!who)
p = current;
else
- p = find_task_by_pid(who);
+ p = find_task_by_pid(current->pspace, who);
if (p)
ret = p->ioprio;
break;
case IOPRIO_WHO_PGRP:
if (!who)
who = process_group(current);
- do_each_task_pid(who, PIDTYPE_PGID, p) {
+ do_each_task_pid(current->pspace, who, PIDTYPE_PGID, p) {
if (ret == -ESRCH)
ret = p->ioprio;
else
ret = ioprio_best(ret, p->ioprio);
- } while_each_task_pid(who, PIDTYPE_PGID, p);
+ } while_each_task_pid(current->pspace, who, PIDTYPE_PGID, p);
break;
case IOPRIO_WHO_USER:
if (!who)
--
1.1.5.g3480
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]