diff mbox series

[1/5] mmzone: Introduce folio_is_zone_movable()

Message ID 20230613201827.9441-2-vishal.moola@gmail.com (mailing list archive)
State New
Headers show
Series Replace is_longterm_pinnable_page() | expand

Commit Message

Vishal Moola June 13, 2023, 8:18 p.m. UTC
Introduce folio_is_zone_movable() to act as a folio equivalent for
is_zone_movable_page(). This is to assist in later folio conversions.

Signed-off-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
---
 include/linux/mmzone.h | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Matthew Wilcox June 13, 2023, 8:53 p.m. UTC | #1
On Tue, Jun 13, 2023 at 01:18:23PM -0700, Vishal Moola (Oracle) wrote:
> Introduce folio_is_zone_movable() to act as a folio equivalent for
> is_zone_movable_page(). This is to assist in later folio conversions.

Honestly, I thought we already had this one.

Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
diff mbox series

Patch

diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index a4889c9d4055..744bf32e48a8 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -1116,6 +1116,11 @@  static inline bool is_zone_movable_page(const struct page *page)
 {
 	return page_zonenum(page) == ZONE_MOVABLE;
 }
+
+static inline bool folio_is_zone_movable(const struct folio *folio)
+{
+	return folio_zonenum(folio) == ZONE_MOVABLE;
+}
 #endif
 
 /*