Re: [PATCH V2] mm/page-flags: make __PageMovable return bool

From: David Hildenbrand
Date: Thu Apr 04 2024 - 15:28:20 EST


On 21.03.24 04:22, Hao Ge wrote:
make __PageMovable return bool like __folio_test_movable

Signed-off-by: Hao Ge <gehao@xxxxxxxxxx>

---
v2: Send this patch on the latest version
---
include/linux/page-flags.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 5ee2d0ab62c6..2647c7a35c5a 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -689,7 +689,7 @@ static __always_inline bool __folio_test_movable(const struct folio *folio)
PAGE_MAPPING_MOVABLE;
}
-static __always_inline int __PageMovable(const struct page *page)
+static __always_inline bool __PageMovable(const struct page *page)
{
return ((unsigned long)page->mapping & PAGE_MAPPING_FLAGS) ==
PAGE_MAPPING_MOVABLE;

Reviewed-by: David Hildenbrand <david@xxxxxxxxxx>

--
Cheers,

David / dhildenb