Thread (128 messages) 128 messages, 3 authors, 2021-06-28

Re: [PATCH v2 19/46] mm/migrate: Add folio_migrate_flags()

From: Christoph Hellwig <hch@infradead.org>
Date: 2021-06-23 08:32:35
Also in: linux-fsdevel, lkml

 	/*
 	 * Please do not reorder this without considering how mm/ksm.c's
 	 * get_ksm_page() depends upon ksm_migrate_page() and PageSwapCache().
 	 */
-	if (PageSwapCache(page))
-		ClearPageSwapCache(page);
-	ClearPagePrivate(page);
-	set_page_private(page, 0);
+	if (folio_swapcache(folio))
+		folio_clear_swapcache_flag(folio);
+	folio_clear_private_flag(folio);
+
+	/* page->private contains hugetlb specific flags */
+	if (!folio_hugetlb(folio))
+		folio->private = NULL;
Ymmm. Dosn't the ->private handling change now?  Given that you
added a comment it seems intentional, but I do not understand why
it changes as part of the conversion.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help