Skip to content
Commit 15f0ec94 authored by Jan Stancek's avatar Jan Stancek Committed by Linus Torvalds
Browse files

mm/hugetlbfs: fix for_each_hstate() loop in init_hugetlbfs_fs()



LTP memfd_create04 started failing for some huge page sizes
after v5.4-10135-gc3bfc5dd73c6.

The problem is the check introduced to for_each_hstate() loop that
should skip default_hstate_idx.  Since it doesn't update 'i' counter,
all subsequent huge page sizes are skipped as well.

Fixes: 8fc312b3 ("mm/hugetlbfs: fix error handling when setting up mounts")
Signed-off-by: default avatarJan Stancek <jstancek@redhat.com>
Reviewed-by: default avatarMike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7ca4ad5b
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