All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged mm-stable] mm-migrate-add-folio_movable_ops.patch removed from -mm tree
@ 2023-02-13 23:55 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-02-13 23:55 UTC (permalink / raw)
  To: mm-commits, willy, vishal.moola, akpm


The quilt patch titled
     Subject: mm/migrate: add folio_movable_ops()
has been removed from the -mm tree.  Its filename was
     mm-migrate-add-folio_movable_ops.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: "Vishal Moola (Oracle)" <vishal.moola@gmail.com>
Subject: mm/migrate: add folio_movable_ops()
Date: Mon, 30 Jan 2023 13:43:50 -0800

folio_movable_ops() does the same as page_movable_ops() except uses folios
instead of pages.  This function will help make folio conversions in
migrate.c more readable.

Link: https://lkml.kernel.org/r/20230130214352.40538-3-vishal.moola@gmail.com
Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---


--- a/include/linux/migrate.h~mm-migrate-add-folio_movable_ops
+++ a/include/linux/migrate.h
@@ -123,6 +123,15 @@ static inline bool folio_test_movable(st
 }
 
 static inline
+const struct movable_operations *folio_movable_ops(struct folio *folio)
+{
+	VM_BUG_ON(!__folio_test_movable(folio));
+
+	return (const struct movable_operations *)
+		((unsigned long)folio->mapping - PAGE_MAPPING_MOVABLE);
+}
+
+static inline
 const struct movable_operations *page_movable_ops(struct page *page)
 {
 	VM_BUG_ON(!__PageMovable(page));
--- a/mm/migrate.c~mm-migrate-add-folio_movable_ops
+++ a/mm/migrate.c
@@ -990,7 +990,7 @@ static int move_to_new_folio(struct foli
 			goto out;
 		}
 
-		mops = page_movable_ops(&src->page);
+		mops = folio_movable_ops(src);
 		rc = mops->migrate_page(&dst->page, &src->page, mode);
 		WARN_ON_ONCE(rc == MIGRATEPAGE_SUCCESS &&
 				!folio_test_isolated(src));
_

Patches currently in -mm which might be from vishal.moola@gmail.com are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-13 23:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-13 23:55 [merged mm-stable] mm-migrate-add-folio_movable_ops.patch removed from -mm tree Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.