git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pull now into release branch
[pandora-kernel.git]
/
fs
/
ioprio.c
diff --git
a/fs/ioprio.c
b/fs/ioprio.c
index
6dc6721
..
10d2c21
100644
(file)
--- a/
fs/ioprio.c
+++ b/
fs/ioprio.c
@@
-60,6
+60,7
@@
asmlinkage long sys_ioprio_set(int which, int who, int ioprio)
int data = IOPRIO_PRIO_DATA(ioprio);
struct task_struct *p, *g;
struct user_struct *user;
int data = IOPRIO_PRIO_DATA(ioprio);
struct task_struct *p, *g;
struct user_struct *user;
+ struct pid *pgrp;
int ret;
switch (class) {
int ret;
switch (class) {
@@
-98,12
+99,14
@@
asmlinkage long sys_ioprio_set(int which, int who, int ioprio)
break;
case IOPRIO_WHO_PGRP:
if (!who)
break;
case IOPRIO_WHO_PGRP:
if (!who)
- who = process_group(current);
- do_each_task_pid(who, PIDTYPE_PGID, p) {
+ pgrp = task_pgrp(current);
+ else
+ pgrp = find_pid(who);
+ do_each_pid_task(pgrp, PIDTYPE_PGID, p) {
ret = set_task_ioprio(p, ioprio);
if (ret)
break;
ret = set_task_ioprio(p, ioprio);
if (ret)
break;
- } while_each_
task_pid(who
, PIDTYPE_PGID, p);
+ } while_each_
pid_task(pgrp
, PIDTYPE_PGID, p);
break;
case IOPRIO_WHO_USER:
if (!who)
break;
case IOPRIO_WHO_USER:
if (!who)
@@
-150,11
+153,6
@@
int ioprio_best(unsigned short aprio, unsigned short bprio)
unsigned short aclass = IOPRIO_PRIO_CLASS(aprio);
unsigned short bclass = IOPRIO_PRIO_CLASS(bprio);
unsigned short aclass = IOPRIO_PRIO_CLASS(aprio);
unsigned short bclass = IOPRIO_PRIO_CLASS(bprio);
- if (!ioprio_valid(aprio))
- return bprio;
- if (!ioprio_valid(bprio))
- return aprio;
-
if (aclass == IOPRIO_CLASS_NONE)
aclass = IOPRIO_CLASS_BE;
if (bclass == IOPRIO_CLASS_NONE)
if (aclass == IOPRIO_CLASS_NONE)
aclass = IOPRIO_CLASS_BE;
if (bclass == IOPRIO_CLASS_NONE)
@@
-172,6
+170,7
@@
asmlinkage long sys_ioprio_get(int which, int who)
{
struct task_struct *g, *p;
struct user_struct *user;
{
struct task_struct *g, *p;
struct user_struct *user;
+ struct pid *pgrp;
int ret = -ESRCH;
int tmpio;
int ret = -ESRCH;
int tmpio;
@@
-187,8
+186,10
@@
asmlinkage long sys_ioprio_get(int which, int who)
break;
case IOPRIO_WHO_PGRP:
if (!who)
break;
case IOPRIO_WHO_PGRP:
if (!who)
- who = process_group(current);
- do_each_task_pid(who, PIDTYPE_PGID, p) {
+ pgrp = task_pgrp(current);
+ else
+ pgrp = find_pid(who);
+ do_each_pid_task(pgrp, PIDTYPE_PGID, p) {
tmpio = get_task_ioprio(p);
if (tmpio < 0)
continue;
tmpio = get_task_ioprio(p);
if (tmpio < 0)
continue;
@@
-196,7
+197,7
@@
asmlinkage long sys_ioprio_get(int which, int who)
ret = tmpio;
else
ret = ioprio_best(ret, tmpio);
ret = tmpio;
else
ret = ioprio_best(ret, tmpio);
- } while_each_
task_pid(who
, PIDTYPE_PGID, p);
+ } while_each_
pid_task(pgrp
, PIDTYPE_PGID, p);
break;
case IOPRIO_WHO_USER:
if (!who)
break;
case IOPRIO_WHO_USER:
if (!who)