mm/hugetlb.c: use first_memory_node
authorAndrew Morton <akpm@linux-foundation.org>
Fri, 20 May 2016 00:11:40 +0000 (17:11 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 20 May 2016 02:12:14 +0000 (19:12 -0700)
Instead of open-coding it.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/hugetlb.c

index 0adb74d0a4e1f57e8a305ca5445c7f75edd58137..0f580ea7f41d9137ecc379468f4e1029703cd802 100644 (file)
@@ -2684,8 +2684,8 @@ void __init hugetlb_add_hstate(unsigned int order)
        for (i = 0; i < MAX_NUMNODES; ++i)
                INIT_LIST_HEAD(&h->hugepage_freelists[i]);
        INIT_LIST_HEAD(&h->hugepage_activelist);
-       h->next_nid_to_alloc = first_node(node_states[N_MEMORY]);
-       h->next_nid_to_free = first_node(node_states[N_MEMORY]);
+       h->next_nid_to_alloc = first_memory_node;
+       h->next_nid_to_free = first_memory_node;
        snprintf(h->name, HSTATE_NAME_LEN, "hugepages-%lukB",
                                        huge_page_size(h)/1024);
 
This page took 0.027219 seconds and 5 git commands to generate.