Message ID | 20201229231507.0MS9eCjiX%akpm@linux-foundation.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [01/16] selftests/vm: fix building protection keys test | expand |
--- a/mm/slub.c~mm-slub-call-account_slab_page-after-slab-page-initialization +++ a/mm/slub.c @@ -1619,9 +1619,6 @@ static inline struct page *alloc_slab_pa else page = __alloc_pages_node(node, flags, order); - if (page) - account_slab_page(page, order, s); - return page; } @@ -1774,6 +1771,8 @@ static struct page *allocate_slab(struct page->objects = oo_objects(oo); + account_slab_page(page, oo_order(oo), s); + page->slab_cache = s; __SetPageSlab(page); if (page_is_pfmemalloc(page))