summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2015-04-08 09:45:22 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2015-04-08 09:45:22 +1000
commit7c6395d4e32fa22001b9f55de9d62d35a2666035 (patch)
tree13e7f000512d59c532192c6170706af8dd09c879
parente293284ecbc4ae41631231fd3834a5c7adb3af36 (diff)
downloadlinux-7c6395d4e32fa22001b9f55de9d62d35a2666035.tar.gz
linux-7c6395d4e32fa22001b9f55de9d62d35a2666035.tar.xz
kernel-forkc-avoid-division-by-zero-fix-fix
s/clamp/clamp_t/ Cc: Guenter Roeck <linux@roeck-us.net> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Ingo Molnar <mingo@kernel.org> Cc: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--kernel/fork.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 6ffe8e90f21f..d45f4dbdf358 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -280,7 +280,7 @@ static void set_max_threads(void)
threads = div64_u64((u64) totalram_pages * (u64) PAGE_SIZE,
(u64) THREAD_SIZE * 8UL);
- max_threads = clamp(threads, MIN_THREADS, MAX_THREADS);
+ max_threads = clamp_t(u64, threads, MIN_THREADS, MAX_THREADS);
}
void __init fork_init(void)