projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75e45d5
)
sys: Replace hardcoding of -20 and 19 with MIN_NICE and MAX_NICE
author
Dongsheng Yang
<yangds.fnst@cn.fujitsu.com>
Tue, 11 Feb 2014 07:34:51 +0000
(15:34 +0800)
committer
Ingo Molnar
<mingo@kernel.org>
Sat, 22 Feb 2014 17:16:19 +0000
(18:16 +0100)
Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Robin Holt <holt@sgi.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Kees Cook <keescook@chromium.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Link:
http://lkml.kernel.org/r/0261f094b836f1acbcdf52e7166487c0c77323c8.1392103744.git.yangds.fnst@cn.fujitsu.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sys.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/sys.c
b/kernel/sys.c
index c0a58be780a407a5bf350e852db1c9800c98dd34..adaeab6f7a870ae69537baebf4ca092a161d5013 100644
(file)
--- a/
kernel/sys.c
+++ b/
kernel/sys.c
@@
-174,10
+174,10
@@
SYSCALL_DEFINE3(setpriority, int, which, int, who, int, niceval)
/* normalize: avoid signed division (rounding problems) */
error = -ESRCH;
- if (niceval <
-20
)
- niceval =
-20
;
- if (niceval >
19
)
- niceval =
19
;
+ if (niceval <
MIN_NICE
)
+ niceval =
MIN_NICE
;
+ if (niceval >
MAX_NICE
)
+ niceval =
MAX_NICE
;
rcu_read_lock();
read_lock(&tasklist_lock);