diff options
author | Dongsheng Yang <yangds.fnst@cn.fujitsu.com> | 2014-05-08 18:33:49 +0900 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-05-22 11:16:36 +0200 |
commit | 7aa2c016db2162defff77f6f5731bff3f25e5175 (patch) | |
tree | af4d613e911eec6db4ccffeb1d100f718a9de9c5 /drivers/staging/android | |
parent | a803f0261bb2bb57aab5542af3174db43b2a3887 (diff) |
sched: Consolidate open coded implementations of nice level frobbing into nice_to_rlimit() and rlimit_to_nice()
Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/a568a1e3cc8e78648f41b5035fa5e381d36274da.1399532322.git.yangds.fnst@cn.fujitsu.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/staging/android')
-rw-r--r-- | drivers/staging/android/binder.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c index 179b21b6650..9311bb67ec3 100644 --- a/drivers/staging/android/binder.c +++ b/drivers/staging/android/binder.c @@ -436,7 +436,7 @@ static void binder_set_nice(long nice) set_user_nice(current, nice); return; } - min_nice = 20 - current->signal->rlim[RLIMIT_NICE].rlim_cur; + min_nice = rlimit_to_nice(current->signal->rlim[RLIMIT_NICE].rlim_cur); binder_debug(BINDER_DEBUG_PRIORITY_CAP, "%d: nice value %ld not allowed use %ld instead\n", current->pid, nice, min_nice); |