diff options
author | Oscar Salvador <osalvador@suse.de> | 2020-12-14 19:12:08 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-12-15 12:13:44 -0800 |
commit | 39a0feaef1105d79028fac3078e3c67e137ce98d (patch) | |
tree | 50b329cc69e53a8f09c1cab49c789ba08b573c48 /mm/hugetlb.c | |
parent | 0a4f3d1bb91cac4efdd780373638b6a1a4c24c51 (diff) |
mm,hugetlb: remove unneeded initialization
hugetlb_add_hstate initializes nr_huge_pages and free_huge_pages to 0, but
since hstates[] is a global variable, all its fields are defined to 0
already.
Link: https://lkml.kernel.org/r/20201119112141.6452-1-osalvador@suse.de
Signed-off-by: Oscar Salvador <osalvador@suse.de>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r-- | mm/hugetlb.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 70ecc1538499..f94c673f1e19 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -3198,8 +3198,6 @@ void __init hugetlb_add_hstate(unsigned int order) h = &hstates[hugetlb_max_hstate++]; h->order = order; h->mask = ~((1ULL << (order + PAGE_SHIFT)) - 1); - h->nr_huge_pages = 0; - h->free_huge_pages = 0; for (i = 0; i < MAX_NUMNODES; ++i) INIT_LIST_HEAD(&h->hugepage_freelists[i]); INIT_LIST_HEAD(&h->hugepage_activelist); |