[PATCH 15/15] mm/z3fold: introduce __zpdesc_clear_movable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Alex Shi <alexs@xxxxxxxxxx>

Add a helper __zpdesc_clear_movable() for __ClearPageMovable(), and use it
in callers, that make code clear.

Signed-off-by: Alex Shi <alexs@xxxxxxxxxx>
---
 mm/z3fold.c | 4 ++--
 mm/zpdesc.h | 5 +++++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/mm/z3fold.c b/mm/z3fold.c
index 35e48440c517..e23d56f46760 100644
--- a/mm/z3fold.c
+++ b/mm/z3fold.c
@@ -352,7 +352,7 @@ static void free_z3fold_page(struct zpdesc *zpdesc, bool headless)
 {
 	if (!headless) {
 		zpdesc_lock(zpdesc);
-		__ClearPageMovable(zpdesc_page(zpdesc));
+		__zpdesc_clear_movable(zpdesc);
 		zpdesc_unlock(zpdesc);
 	}
 	__free_page(zpdesc_page(zpdesc));
@@ -1322,7 +1322,7 @@ static int z3fold_page_migrate(struct page *newpage, struct page *page,
 	 * so we only have to reinitialize it.
 	 */
 	INIT_LIST_HEAD(&new_zhdr->buddy);
-	__ClearPageMovable(zpdesc_page(zpdesc));
+	__zpdesc_clear_movable(zpdesc);
 
 	zpdesc_get(newzpdesc);
 	z3fold_page_lock(new_zhdr);
diff --git a/mm/zpdesc.h b/mm/zpdesc.h
index 44473382f2cc..1319575dc31a 100644
--- a/mm/zpdesc.h
+++ b/mm/zpdesc.h
@@ -79,4 +79,9 @@ static inline void __zpdesc_set_movable(struct zpdesc *zpdesc,
 	__SetPageMovable(zpdesc_page(zpdesc), mops);
 }
 
+static inline void __zpdesc_clear_movable(struct zpdesc *zpdesc)
+{
+	__ClearPageMovable(zpdesc_page(zpdesc));
+}
+
 #endif
-- 
2.43.0





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux