Skip to content

Commit

Permalink
mm/slub.c: use hotplug_memory_notifier() directly
Browse files Browse the repository at this point in the history
Since patch 3163462 has already updated the minimum gcc version to 5.1.
The previous problem mentioned in patch f02c696 is not existed. So we
can now revert to use hotplug_memory_notifier() directly rather than
register_hotmemory_notifier().

Signed-off-by: Liu Shixin <liushixin2@huawei.com>
  • Loading branch information
Liu Shixin authored and intel-lab-lkp committed Sep 19, 2022
1 parent e51ec2e commit 6958075
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions mm/slub.c
Expand Up @@ -4772,11 +4772,6 @@ static int slab_memory_callback(struct notifier_block *self,
return ret;
}

static struct notifier_block slab_memory_callback_nb = {
.notifier_call = slab_memory_callback,
.priority = SLAB_CALLBACK_PRI,
};

/********************************************************************
* Basic setup of slabs
*******************************************************************/
Expand Down Expand Up @@ -4842,7 +4837,7 @@ void __init kmem_cache_init(void)
create_boot_cache(kmem_cache_node, "kmem_cache_node",
sizeof(struct kmem_cache_node), SLAB_HWCACHE_ALIGN, 0, 0);

register_hotmemory_notifier(&slab_memory_callback_nb);
hotplug_memory_notifier(slab_memory_callback, SLAB_CALLBACK_PRI);

/* Able to allocate the per node structures */
slab_state = PARTIAL;
Expand Down

0 comments on commit 6958075

Please sign in to comment.