Re: [PATCH 2/3] mm/hugetlb: Remove unnecessary if condition

From: Andrew Morton

Date: Thu Jan 15 2026 - 16:59:44 EST


On Thu, 15 Jan 2026 16:10:51 -0500 Joshua Hahn <joshua.hahnjy@xxxxxxxxx> wrote:

> > > - spin_unlock_irq(&hugetlb_lock);
> > > - }
> > > + spin_lock_irq(&hugetlb_lock);
> > > + hugetlb_cgroup_uncharge_folio_rsvd(
> > > + hstate_index(h), pages_per_huge_page(h),
> > > + folio);
> > > + spin_unlock_irq(&hugetlb_lock);
> > > }
> > > }
> > >
> >
> > MAP_CHG_NEEDED = 1
> >
> > Acked-by: David Hildenbrand (Red Hat) <david@xxxxxxxxxx>
>
> Thank you David, I agree it's helpful to include MAP_CHG_NEEDED != 0.

Oh.

> Will add in the v2! Have a great day : -)

While in there, this:

> > > + hugetlb_cgroup_uncharge_folio_rsvd(
> > > + hstate_index(h), pages_per_huge_page(h),
> > > + folio);

contains now-less-needed 80-column party tricks.