On Tue, May 12, 2026 at 05:05:26PM -0400, Michael S. Tsirkin wrote: > Remove the !CONFIG_HUGETLB_PAGE stub for alloc_hugetlb_folio(). > > The stub is dead code: all callers are in mm/hugetlb.c > (CONFIG_HUGETLB_PAGE) or fs/hugetlbfs/inode.c (CONFIG_HUGETLBFS), > and CONFIG_HUGETLB_PAGE is def_bool HUGETLBFS with nothing > selecting it independently. > > The stub is also broken: it returns NULL, but all callers check > IS_ERR(folio), so a NULL return would not be caught and would > crash on the subsequent folio dereference. > > Remove it now since follow-up patches change the signature of > alloc_hugetlb_folio and would otherwise need to update the > broken stub too. > > Signed-off-by: Michael S. Tsirkin <[email protected]> > Assisted-by: Claude:claude-opus-4-6
Reviewed-by: Gregory Price <[email protected]>

