arm64: mremap speedup - enable HAVE_MOVE_PUD
[linux-2.6-microblaze.git] / mm / slub.c
index 34dcc09..6326b98 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1836,8 +1836,8 @@ static void __free_slab(struct kmem_cache *s, struct page *page)
 
        __ClearPageSlabPfmemalloc(page);
        __ClearPageSlab(page);
-
-       page->mapping = NULL;
+       /* In union with page->mapping where page allocator expects NULL */
+       page->slab_cache = NULL;
        if (current->reclaim_state)
                current->reclaim_state->reclaimed_slab += pages;
        unaccount_slab_page(page, order, s);
@@ -2245,8 +2245,7 @@ redo:
                }
        } else {
                m = M_FULL;
-#ifdef CONFIG_SLUB_DEBUG
-               if ((s->flags & SLAB_STORE_USER) && !lock) {
+               if (kmem_cache_debug_flags(s, SLAB_STORE_USER) && !lock) {
                        lock = 1;
                        /*
                         * This also ensures that the scanning of full
@@ -2255,7 +2254,6 @@ redo:
                         */
                        spin_lock(&n->list_lock);
                }
-#endif
        }
 
        if (l != m) {
@@ -3433,7 +3431,7 @@ static inline int calculate_order(unsigned int size)
         */
        min_objects = slub_min_objects;
        if (!min_objects)
-               min_objects = 4 * (fls(nr_cpu_ids) + 1);
+               min_objects = 4 * (fls(num_online_cpus()) + 1);
        max_objects = order_objects(slub_max_order, size);
        min_objects = min(min_objects, max_objects);