hugetlbfs: Use helper macro default_hstate in init_hugetlbfs_fs
Subsystems (2)
PATCH 1/1 hugetlbfs: Use helper macro default_hstate in init_hugetlbfs_fs
Since commit e5ff215941d5 ("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.
--- fs/hugetlbfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/hugetlbfs/inode.c +1 -1
@@ -1544,7 +1544,7 @@ static int __init init_hugetlbfs_fs(void) goto out_free;/* default hstate mount is required */ - mnt =mount_one_hugetlbfs (&hstates[default_hstate_idx]); + mnt =mount_one_hugetlbfs (&default_hstate);if (IS_ERR (mnt)) { error =PTR_ERR (mnt); goto out_unreg;
Signature · 1 line
2.19.1
Quoted 15 lines · Miaohe Lin
Since commit
e5ff215941d5("hugetlb: multiple hstates for multiple page sizes"), we can use macrodefault_hstateto get the struct hstate which we use by default. Butinit_hugetlbfs_fs()forgot to use it.Signed-off-by Miaohe Lin <[email protected]>--- fs/hugetlbfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/hugetlbfs/inode.c +0
-0
fs/hugetlbfs/inode.c static int __init init_hugetlbfs_fs(void) · line 1550
Quoted 8 lines
fs/hugetlbfs/inode.c +1
-1@@ -1544,7 +1544,7 @@ static int __init init_hugetlbfs_fs(void) goto out_free;/* default hstate mount is required */ - mnt =mount_one_hugetlbfs (&hstates[default_hstate_idx]); + mnt =mount_one_hugetlbfs (&default_hstate);if (IS_ERR (mnt)) { error =PTR_ERR (mnt); goto out_unreg;
Signature · 3 lines
Thanks, David / dhildenb
Quoted 5 lines · Miaohe Lin
Since commit
e5ff215941d5("hugetlb: multiple hstates for multiple page sizes"), we can use macrodefault_hstateto get the struct hstate which we use by default. Butinit_hugetlbfs_fs()forgot to use it.Signed-off-by Miaohe Lin <[email protected]>
Thanks,
Signature · 1 line
Mike Kravetz
Quoted 18 lines
--- fs/hugetlbfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/hugetlbfs/inode.c +1
-1@@ -1544,7 +1544,7 @@ static int __init init_hugetlbfs_fs(void) goto out_free;/* default hstate mount is required */ - mnt =mount_one_hugetlbfs (&hstates[default_hstate_idx]); + mnt =mount_one_hugetlbfs (&default_hstate);if (IS_ERR (mnt)) { error =PTR_ERR (mnt); goto out_unreg;
CC Andrew
Quoted 11 lines · Mike Kravetz
Quoted 5 lines · Miaohe Lin
Since commit
e5ff215941d5("hugetlb: multiple hstates for multiple page sizes"), we can use macrodefault_hstateto get the struct hstate which we use by default. Butinit_hugetlbfs_fs()forgot to use it.Signed-off-by Miaohe Lin <[email protected]>Thanks,
Reviewed-by Mike Kravetz <[email protected]>