Re: [PATCH 2/3] mm/hugetlb: Remove unnecessary if condition
From: Joshua Hahn
Date: Thu Jan 15 2026 - 17:04:19 EST
On Thu, 15 Jan 2026 13:59:42 -0800 Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> 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.
Ah, that's a nice catch as well. I'll be sure to include it as well!
My bigger motivation for sending a v2 was mostly to separate out the
fix from the cleanup patches. Since they are separate now, I'll send out a
v2 for 2/3 and 3/3, while I wait for reviews for 1/3 and send out a v2 for
that one at a later point. For what it's worth, I don't think the fix is
super urgent : -)
Thanks again, Andrew!
Joshua