diff options
Diffstat (limited to 'kernel/sys.c')
-rw-r--r-- | kernel/sys.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index 585d6cd10040..20ccfb5da6af 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -189,10 +189,10 @@ SYSCALL_DEFINE3(setpriority, int, which, int, who, int, niceval) | |||
189 | !(user = find_user(who))) | 189 | !(user = find_user(who))) |
190 | goto out_unlock; /* No processes for this user */ | 190 | goto out_unlock; /* No processes for this user */ |
191 | 191 | ||
192 | do_each_thread(g, p) | 192 | do_each_thread(g, p) { |
193 | if (__task_cred(p)->uid == who) | 193 | if (__task_cred(p)->uid == who) |
194 | error = set_one_prio(p, niceval, error); | 194 | error = set_one_prio(p, niceval, error); |
195 | while_each_thread(g, p); | 195 | } while_each_thread(g, p); |
196 | if (who != cred->uid) | 196 | if (who != cred->uid) |
197 | free_uid(user); /* For find_user() */ | 197 | free_uid(user); /* For find_user() */ |
198 | break; | 198 | break; |
@@ -252,13 +252,13 @@ SYSCALL_DEFINE2(getpriority, int, which, int, who) | |||
252 | !(user = find_user(who))) | 252 | !(user = find_user(who))) |
253 | goto out_unlock; /* No processes for this user */ | 253 | goto out_unlock; /* No processes for this user */ |
254 | 254 | ||
255 | do_each_thread(g, p) | 255 | do_each_thread(g, p) { |
256 | if (__task_cred(p)->uid == who) { | 256 | if (__task_cred(p)->uid == who) { |
257 | niceval = 20 - task_nice(p); | 257 | niceval = 20 - task_nice(p); |
258 | if (niceval > retval) | 258 | if (niceval > retval) |
259 | retval = niceval; | 259 | retval = niceval; |
260 | } | 260 | } |
261 | while_each_thread(g, p); | 261 | } while_each_thread(g, p); |
262 | if (who != cred->uid) | 262 | if (who != cred->uid) |
263 | free_uid(user); /* for find_user() */ | 263 | free_uid(user); /* for find_user() */ |
264 | break; | 264 | break; |