Commit 7f4b606
mm/hugetlb: refactor __unmap_hugepage_range() to take folio instead of page
The function __unmap_hugepage_range() has two kinds of users:
1) unmap_hugepage_range(), which passes in the head page of a folio.
Since unmap_hugepage_range() already takes folio and there are no other
uses of the folio struct in the function, it is natural for
__unmap_hugepage_range() to take folio also.
2) All other uses, which pass in NULL pointer.
In both cases, we can pass in folio. Refactor __unmap_hugepage_range() to
take folio.
Link: https://lkml.kernel.org/r/20250505182345.506888-5-nifan.cxl@gmail.com
Signed-off-by: Fan Ni <fan.ni@samsung.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Cc: "Vishal Moola (Oracle)" <vishal.moola@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent 81edb1b commit 7f4b606
2 files changed
Lines changed: 11 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
458 | | - | |
| 458 | + | |
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5840 | 5840 | | |
5841 | 5841 | | |
5842 | 5842 | | |
5843 | | - | |
| 5843 | + | |
5844 | 5844 | | |
5845 | 5845 | | |
5846 | 5846 | | |
| |||
5913 | 5913 | | |
5914 | 5914 | | |
5915 | 5915 | | |
5916 | | - | |
5917 | | - | |
5918 | | - | |
| 5916 | + | |
| 5917 | + | |
| 5918 | + | |
5919 | 5919 | | |
5920 | | - | |
5921 | | - | |
| 5920 | + | |
| 5921 | + | |
5922 | 5922 | | |
5923 | 5923 | | |
5924 | 5924 | | |
| |||
5982 | 5982 | | |
5983 | 5983 | | |
5984 | 5984 | | |
5985 | | - | |
| 5985 | + | |
5986 | 5986 | | |
5987 | | - | |
| 5987 | + | |
5988 | 5988 | | |
5989 | 5989 | | |
5990 | 5990 | | |
| |||
6059 | 6059 | | |
6060 | 6060 | | |
6061 | 6061 | | |
6062 | | - | |
| 6062 | + | |
6063 | 6063 | | |
6064 | 6064 | | |
6065 | 6065 | | |
| |||
0 commit comments