Commit 3b2275a8 authored by Miaohe Lin's avatar Miaohe Lin Committed by Linus Torvalds

hugetlbfs: use helper macro default_hstate in init_hugetlbfs_fs

Since commit e5ff2159 ("hugetlb: multiple hstates for multiple page
sizes"), we can use macro default_hstate to get the struct hstate which we
use by default.  But init_hugetlbfs_fs() forgot to use it.

Link: https://lkml.kernel.org/r/20210116091827.20982-1-linmiaohe@huawei.comSigned-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Reviewed-by: default avatarMike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d0146756
...@@ -1543,7 +1543,7 @@ static int __init init_hugetlbfs_fs(void) ...@@ -1543,7 +1543,7 @@ static int __init init_hugetlbfs_fs(void)
goto out_free; goto out_free;
/* default hstate mount is required */ /* default hstate mount is required */
mnt = mount_one_hugetlbfs(&hstates[default_hstate_idx]); mnt = mount_one_hugetlbfs(&default_hstate);
if (IS_ERR(mnt)) { if (IS_ERR(mnt)) {
error = PTR_ERR(mnt); error = PTR_ERR(mnt);
goto out_unreg; goto out_unreg;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment