[PATCH 1/5] mmzone: Introduce folio_is_zone_movable()

Vishal Moola (Oracle) posted 5 patches 2 years, 7 months ago
There is a newer version of this series
[PATCH 1/5] mmzone: Introduce folio_is_zone_movable()
Posted by Vishal Moola (Oracle) 2 years, 7 months ago
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(+)

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
 
 /*
-- 
2.40.1
Re: [PATCH 1/5] mmzone: Introduce folio_is_zone_movable()
Posted by Matthew Wilcox 2 years, 7 months ago
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>