summaryrefslogtreecommitdiffstats
path: root/mm/page_table_check.c
diff options
context:
space:
mode:
authorKemeng Shi <shikemeng@huaweicloud.com>2023-07-18 22:58:11 +0800
committerAndrew Morton <akpm@linux-foundation.org>2023-08-21 13:37:27 -0700
commitd981e2804c92b505e76f44e66909f3ae805d3aa2 (patch)
tree2eda867cdabbc8df85af0acba036f3ee11994603 /mm/page_table_check.c
parentc0a5d93a885b42c22085ad0f39233795f4a578e0 (diff)
downloadlinux-stable-d981e2804c92b505e76f44e66909f3ae805d3aa2.tar.gz
linux-stable-d981e2804c92b505e76f44e66909f3ae805d3aa2.tar.bz2
linux-stable-d981e2804c92b505e76f44e66909f3ae805d3aa2.zip
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.com Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com> Reviewed-by: Andrew Morton <akpm@linux-foudation.org> Acked-by: Mike Rapoport (IBM) <rppt@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/page_table_check.c')
-rw-r--r--mm/page_table_check.c2
1 files changed, 1 insertions, 1 deletions
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);
}
/*