Messages in this thread | | | Subject | Re: [PATCH 1/4] sys: remove unnecesscary parameter of set_one_prio | From | Joe Perches <> | Date | Thu, 30 May 2013 01:08:25 -0700 |
| |
On Thu, 2013-05-30 at 15:58 +0800, liguang wrote: [] > diff --git a/kernel/sys.c b/kernel/sys.c [] > -static int set_one_prio(struct task_struct *p, int niceval, int error) > +static int set_one_prio(struct task_struct *p, int niceval)
Umm, error is forwarded through do_each loops.
Are you sure you can do this without changing any return code behaviors?
[]
> @@ -211,7 +209,7 @@ SYSCALL_DEFINE3(setpriority, int, which, int, who, int, niceval) > else > pgrp = task_pgrp(current); > do_each_pid_thread(pgrp, PIDTYPE_PGID, p) { > - error = set_one_prio(p, niceval, error); > + error = set_one_prio(p, niceval); > } while_each_pid_thread(pgrp, PIDTYPE_PGID, p); > break; > case PRIO_USER: > @@ -225,7 +223,7 @@ SYSCALL_DEFINE3(setpriority, int, which, int, who, int, niceval) > > do_each_thread(g, p) { > if (uid_eq(task_uid(p), uid)) > - error = set_one_prio(p, niceval, error); > + error = set_one_prio(p, niceval); > } while_each_thread(g, p); > if (!uid_eq(uid, cred->uid)) > free_uid(user); /* For find_user() */
| |