OSDN Git Service

Merge 4.4.171 into android-4.4-p
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / mm / slab.c
index 8fc762c..6180cba 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -859,8 +859,10 @@ static struct alien_cache *__alloc_alien_cache(int node, int entries,
        struct alien_cache *alc = NULL;
 
        alc = kmalloc_node(memsize, gfp, node);
-       init_arraycache(&alc->ac, entries, batch);
-       spin_lock_init(&alc->lock);
+       if (alc) {
+               init_arraycache(&alc->ac, entries, batch);
+               spin_lock_init(&alc->lock);
+       }
        return alc;
 }
 
@@ -3942,7 +3944,8 @@ next:
        next_reap_node();
 out:
        /* Set up the next iteration */
-       schedule_delayed_work(work, round_jiffies_relative(REAPTIMEOUT_AC));
+       schedule_delayed_work_on(smp_processor_id(), work,
+                               round_jiffies_relative(REAPTIMEOUT_AC));
 }
 
 #ifdef CONFIG_SLABINFO