Skip to content

Commit dba438b

Browse files
Matthew Wilcox (Oracle)akpm00
authored andcommitted
rmap: pass the folio to __page_check_anon_rmap()
The lone caller already has the folio, so pass it in instead of deriving it from the page again. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 35fb476 commit dba438b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mm/rmap.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,14 +1175,14 @@ static void __page_set_anon_rmap(struct folio *folio, struct page *page,
11751175

11761176
/**
11771177
* __page_check_anon_rmap - sanity check anonymous rmap addition
1178-
* @page: the page to add the mapping to
1178+
* @folio: The folio containing @page.
1179+
* @page: the page to check the mapping of
11791180
* @vma: the vm area in which the mapping is added
11801181
* @address: the user virtual address mapped
11811182
*/
1182-
static void __page_check_anon_rmap(struct page *page,
1183+
static void __page_check_anon_rmap(struct folio *folio, struct page *page,
11831184
struct vm_area_struct *vma, unsigned long address)
11841185
{
1185-
struct folio *folio = page_folio(page);
11861186
/*
11871187
* The page's anon-rmap details (mapping and index) are guaranteed to
11881188
* be set up correctly at this point.
@@ -1262,7 +1262,7 @@ void page_add_anon_rmap(struct page *page, struct vm_area_struct *vma,
12621262
__page_set_anon_rmap(folio, page, vma, address,
12631263
!!(flags & RMAP_EXCLUSIVE));
12641264
else
1265-
__page_check_anon_rmap(page, vma, address);
1265+
__page_check_anon_rmap(folio, page, vma, address);
12661266
}
12671267

12681268
mlock_vma_folio(folio, vma, compound);

0 commit comments

Comments
 (0)