Commit 81edb1b
mm/hugetlb: refactor unmap_hugepage_range() to take folio instead of page
The function unmap_hugepage_range() has two kinds of users:
1) unmap_ref_private(), which passes in the head page of a folio. Since
unmap_ref_private() 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-4-nifan.cxl@gmail.com
Signed-off-by: Fan Ni <fan.ni@samsung.com>
Reviewed-by: Muchun Song <muchun.song@linux.dev>
Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: "Vishal Moola (Oracle)" <vishal.moola@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent b0752f1 commit 81edb1b
2 files changed
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | | - | |
| 132 | + | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6046 | 6046 | | |
6047 | 6047 | | |
6048 | 6048 | | |
6049 | | - | |
| 6049 | + | |
6050 | 6050 | | |
6051 | 6051 | | |
6052 | 6052 | | |
| |||
6058 | 6058 | | |
6059 | 6059 | | |
6060 | 6060 | | |
6061 | | - | |
| 6061 | + | |
| 6062 | + | |
6062 | 6063 | | |
6063 | 6064 | | |
6064 | 6065 | | |
| |||
6116 | 6117 | | |
6117 | 6118 | | |
6118 | 6119 | | |
6119 | | - | |
| 6120 | + | |
6120 | 6121 | | |
6121 | 6122 | | |
6122 | 6123 | | |
| |||
0 commit comments