aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchenqiwu <[email protected]>2020-04-01 21:04:16 -0700
committerLinus Torvalds <[email protected]>2020-04-02 09:35:26 -0700
commit4c7ba22e4c2dcbffd9618ea79465cedcc403ce62 (patch)
treea9e2fd6bcf7dad0bbab7a25b3b0e72f1c4e6fdb9
parentc537338c055455040c597eeb305b225fa985711c (diff)
mm/slub.c: replace cpu_slab->partial with wrapped APIs
There are slub_percpu_partial() and slub_set_percpu_partial() APIs to wrap kmem_cache->cpu_partial. This patch will use the two to replace cpu_slab->partial in slub code. Signed-off-by: chenqiwu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Andrew Morton <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: Pekka Enberg <[email protected]> Cc: David Rientjes <[email protected]> Cc: Joonsoo Kim <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--mm/slub.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 6589b41d5a60..db0f657c09a1 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2205,11 +2205,11 @@ static void unfreeze_partials(struct kmem_cache *s,
struct kmem_cache_node *n = NULL, *n2 = NULL;
struct page *page, *discard_page = NULL;
- while ((page = c->partial)) {
+ while ((page = slub_percpu_partial(c))) {
struct page new;
struct page old;
- c->partial = page->next;
+ slub_set_percpu_partial(c, page);
n2 = get_node(s, page_to_nid(page));
if (n != n2) {