mirror of
https://github.com/torvalds/linux.git
synced 2025-12-01 07:26:02 +07:00
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>
This commit is contained in:
committed by
Andrew Morton
parent
c0a5d93a88
commit
d981e2804c
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user