summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-17 16:24:09 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-17 16:24:09 -0700
commitde74646c603fa71d1587f1ba5c761d009624abd7 (patch)
treea9d521a4e13fddaa8c6703d7c4e255795235db15 /mm
parenta5e135122c9c5af9e63962e13159174c3aaea858 (diff)
parent1c7e7f6c0703d03af6bcd5ccc11fc15d23e5ecbe (diff)
Merge branch 'akpm' (Andrew's patch-bomb)
Merge Andrew's remaining patches for 3.5: "Nine fixes" * Merge emailed patches from Andrew Morton <akpm@linux-foundation.org>: (9 commits) mm: fix lost kswapd wakeup in kswapd_stop() m32r: make memset() global for CONFIG_KERNEL_BZIP2=y m32r: add memcpy() for CONFIG_KERNEL_GZIP=y m32r: consistently use "suffix-$(...)" m32r: fix 'fix breakage from "m32r: use generic ptrace_resume code"' fallout m32r: fix pull clearing RESTORE_SIGMASK into block_sigmask() fallout m32r: remove duplicate definition of PTRACE_O_TRACESYSGOOD mn10300: fix "pull clearing RESTORE_SIGMASK into block_sigmask()" fallout bootmem: make ___alloc_bootmem_node_nopanic() really nopanic
Diffstat (limited to 'mm')
-rw-r--r--mm/bootmem.c4
-rw-r--r--mm/vmscan.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/mm/bootmem.c b/mm/bootmem.c
index 73096630cb35..bcb63ac48cc5 100644
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -710,6 +710,10 @@ again:
if (ptr)
return ptr;
+ /* do not panic in alloc_bootmem_bdata() */
+ if (limit && goal + size > limit)
+ limit = 0;
+
ptr = alloc_bootmem_bdata(pgdat->bdata, size, align, goal, limit);
if (ptr)
return ptr;
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 661576324c7f..66e431060c05 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2688,7 +2688,10 @@ static void kswapd_try_to_sleep(pg_data_t *pgdat, int order, int classzone_idx)
* them before going back to sleep.
*/
set_pgdat_percpu_threshold(pgdat, calculate_normal_threshold);
- schedule();
+
+ if (!kthread_should_stop())
+ schedule();
+
set_pgdat_percpu_threshold(pgdat, calculate_pressure_threshold);
} else {
if (remaining)