forked from luck/tmp_suning_uos_patched
mm/hugetlb.c: use first_memory_node
Instead of open-coding it. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
949698a31a
commit
54f18d3526
|
@ -2684,8 +2684,8 @@ void __init hugetlb_add_hstate(unsigned int order)
|
||||||
for (i = 0; i < MAX_NUMNODES; ++i)
|
for (i = 0; i < MAX_NUMNODES; ++i)
|
||||||
INIT_LIST_HEAD(&h->hugepage_freelists[i]);
|
INIT_LIST_HEAD(&h->hugepage_freelists[i]);
|
||||||
INIT_LIST_HEAD(&h->hugepage_activelist);
|
INIT_LIST_HEAD(&h->hugepage_activelist);
|
||||||
h->next_nid_to_alloc = first_node(node_states[N_MEMORY]);
|
h->next_nid_to_alloc = first_memory_node;
|
||||||
h->next_nid_to_free = first_node(node_states[N_MEMORY]);
|
h->next_nid_to_free = first_memory_node;
|
||||||
snprintf(h->name, HSTATE_NAME_LEN, "hugepages-%lukB",
|
snprintf(h->name, HSTATE_NAME_LEN, "hugepages-%lukB",
|
||||||
huge_page_size(h)/1024);
|
huge_page_size(h)/1024);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user