Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linux: fix the discovery of hugepages on btrfs fsroot
btrfs always returns 1 in directory stat.st_nlink. It breaks make check in tests/hwloc/linux/ because the hugepages discovery uses st_nlink to allocate the memory page_types array. Always allocate at least 3 page_types slots (enough for all known cases, 1 for normal, 2 for huge pages) and realloc later if needed. Thanks to Ludovic Courtes for the report. Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr> (cherry picked from commit 7f351ce)
- Loading branch information
Showing
1 changed file
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters