diff mbox series

[2/3] mm/page_ext: use page_ext_data helper in page_table_check

Message ID 20230718145812.1991717-3-shikemeng@huaweicloud.com (mailing list archive)
State New
Headers show
Series add page_ext_data to get client data in page_ext | expand

Commit Message

Kemeng Shi July 18, 2023, 2:58 p.m. UTC
use page_ext_data helper in page_table_check to avoid access offset
directly.

Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
---
 mm/page_table_check.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/mm/page_table_check.c b/mm/page_table_check.c
index 84c8163984e5..46e77c12c81e 100644
--- a/mm/page_table_check.c
+++ b/mm/page_table_check.c
@@ -51,7 +51,7 @@  struct page_ext_operations page_table_check_ops = {
 static struct page_table_check *get_page_table_check(struct page_ext *page_ext)
 {
 	BUG_ON(!page_ext);
-	return (void *)(page_ext) + page_table_check_ops.offset;
+	return page_ext_data(page_ext, &page_table_check_ops);
 }
 
 /*