aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ioprio.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ioprio.c')
-rw-r--r--fs/ioprio.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/ioprio.c b/fs/ioprio.c
index 68d2cd807118..bb5210af77c2 100644
--- a/fs/ioprio.c
+++ b/fs/ioprio.c
@@ -32,8 +32,8 @@ static int set_task_ioprio(struct task_struct *task, int ioprio)
32 int err; 32 int err;
33 struct io_context *ioc; 33 struct io_context *ioc;
34 34
35 if (task->uid != current_euid() && 35 if (task->cred->uid != current_euid() &&
36 task->uid != current_uid() && !capable(CAP_SYS_NICE)) 36 task->cred->uid != current_uid() && !capable(CAP_SYS_NICE))
37 return -EPERM; 37 return -EPERM;
38 38
39 err = security_task_setioprio(task, ioprio); 39 err = security_task_setioprio(task, ioprio);
@@ -123,7 +123,7 @@ asmlinkage long sys_ioprio_set(int which, int who, int ioprio)
123 break; 123 break;
124 case IOPRIO_WHO_USER: 124 case IOPRIO_WHO_USER:
125 if (!who) 125 if (!who)
126 user = current->user; 126 user = current->cred->user;
127 else 127 else
128 user = find_user(who); 128 user = find_user(who);
129 129
@@ -131,7 +131,7 @@ asmlinkage long sys_ioprio_set(int which, int who, int ioprio)
131 break; 131 break;
132 132
133 do_each_thread(g, p) { 133 do_each_thread(g, p) {
134 if (p->uid != who) 134 if (p->cred->uid != who)
135 continue; 135 continue;
136 ret = set_task_ioprio(p, ioprio); 136 ret = set_task_ioprio(p, ioprio);
137 if (ret) 137 if (ret)
@@ -216,7 +216,7 @@ asmlinkage long sys_ioprio_get(int which, int who)
216 break; 216 break;
217 case IOPRIO_WHO_USER: 217 case IOPRIO_WHO_USER:
218 if (!who) 218 if (!who)
219 user = current->user; 219 user = current->cred->user;
220 else 220 else
221 user = find_user(who); 221 user = find_user(who);
222 222
@@ -224,7 +224,7 @@ asmlinkage long sys_ioprio_get(int which, int who)
224 break; 224 break;
225 225
226 do_each_thread(g, p) { 226 do_each_thread(g, p) {
227 if (p->uid != user->uid) 227 if (p->cred->uid != user->uid)
228 continue; 228 continue;
229 tmpio = get_task_ioprio(p); 229 tmpio = get_task_ioprio(p);
230 if (tmpio < 0) 230 if (tmpio < 0)