Commit b8179af1 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Andrew Morton
Browse files

mm/memory_hotplug: activate node before adding new memory blocks

The sysfs attributes for memory blocks require the node ID to be set and
initialized, so move the node activation before adding new memory blocks. 
This also has the nice side effect that the BUG_ON() can be converted into
a WARN_ON() as we now can handle registration errors.

Link: https://lkml.kernel.org/r/20250729064637.51662-3-hare@kernel.org


Fixes: b9ff0360 ("mm/memory_hotplug.c: make add_memory_resource use __try_online_node")
Signed-off-by: default avatarHannes Reinecke <hare@kernel.org>
Acked-by: default avatarDavid Hildenbrand <david@redhat.com>
Acked-by: default avatarOscar Salvador <osalvador@suse.de>
Reviewed-by: default avatarDonet Tom <donettom@linux.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent c6a80936
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment