Commit d981e280 authored by Kemeng Shi's avatar Kemeng Shi Committed by Andrew Morton

mm/page_ext: use page_ext_data helper in page_table_check

Use page_ext_data helper in page_table_check to avoid access offset
directly.

Link: https://lkml.kernel.org/r/20230718145812.1991717-3-shikemeng@huaweicloud.comSigned-off-by: default avatarKemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: default avatarAndrew Morton <akpm@linux-foudation.org>
Acked-by: default avatarMike Rapoport (IBM) <rppt@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent c0a5d93a
...@@ -51,7 +51,7 @@ struct page_ext_operations page_table_check_ops = { ...@@ -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) static struct page_table_check *get_page_table_check(struct page_ext *page_ext)
{ {
BUG_ON(!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);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment