summaryrefslogtreecommitdiffstats
path: root/mm/secretmem.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-05-02 07:47:42 +0200
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-05-10 05:12:53 +0200
commit6612ed24a242734560f9643ccb08f2f40b6e144b (patch)
tree1775d0604d77c36e3eed0697d7f8536c1cb84ff9 /mm/secretmem.c
parentnfs: Convert to free_folio (diff)
downloadlinux-6612ed24a242734560f9643ccb08f2f40b6e144b.tar.xz
linux-6612ed24a242734560f9643ccb08f2f40b6e144b.zip
secretmem: Convert to free_folio
Prepare for any size of folio, even though secretmem only uses order-0 folios for now. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'mm/secretmem.c')
-rw-r--r--mm/secretmem.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/secretmem.c b/mm/secretmem.c
index 3b3cf2892b6a..206ed6b40c1d 100644
--- a/mm/secretmem.c
+++ b/mm/secretmem.c
@@ -145,15 +145,15 @@ static int secretmem_migratepage(struct address_space *mapping,
return -EBUSY;
}
-static void secretmem_freepage(struct page *page)
+static void secretmem_free_folio(struct folio *folio)
{
- set_direct_map_default_noflush(page);
- clear_highpage(page);
+ set_direct_map_default_noflush(&folio->page);
+ folio_zero_segment(folio, 0, folio_size(folio));
}
const struct address_space_operations secretmem_aops = {
.dirty_folio = noop_dirty_folio,
- .freepage = secretmem_freepage,
+ .free_folio = secretmem_free_folio,
.migratepage = secretmem_migratepage,
.isolate_page = secretmem_isolate_page,
};