]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/hugetlb: drop vma_has_reserves()
authorPeter Xu <peterx@redhat.com>
Tue, 7 Jan 2025 20:40:01 +0000 (15:40 -0500)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 26 Jan 2025 04:22:31 +0000 (20:22 -0800)
commit72d8f72631d278c7003defbe3fe88fe5332822f8
tree2c3fb4db14c6e04fbbe0078861d1569407ae1d0b
parent51e1de00acdb75585c46654147c7c7eb0689a068
mm/hugetlb: drop vma_has_reserves()

After the previous cleanup, vma_has_reserves() is mostly an empty helper
except that it says "use reserve count" is inverted meaning from "needs a
global reserve count", which is still true.

To avoid confusions on having two inverted ways to ask the same question,
always use the gbl_chg everywhere, and drop the function.

When at it, rename "chg" to "gbl_chg" in dequeue_hugetlb_folio_vma().  It
might be helpful for readers to see that the "chg" here is the global
reserve count, not the vma resv count.

Link: https://lkml.kernel.org/r/20250107204002.2683356-7-peterx@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
Cc: Ackerley Tng <ackerleytng@google.com>
Cc: Breno Leitao <leitao@debian.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Naoya Horiguchi <nao.horiguchi@gmail.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Rik van Riel <riel@surriel.com>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hugetlb.c