Skip to content

Commit

Permalink
mm/page_ext: use page_ext_data helper in page_owner
Browse files Browse the repository at this point in the history
Use page_ext_data helper in page_owner to avoid access offset directly.

Link: https://lkml.kernel.org/r/20230718145812.1991717-4-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>
  • Loading branch information
Kemeng Shi authored and Andrew Morton committed Aug 21, 2023
1 parent d981e28 commit 1cac4c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/page_owner.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ struct page_ext_operations page_owner_ops = {

static inline struct page_owner *get_page_owner(struct page_ext *page_ext)
{
return (void *)page_ext + page_owner_ops.offset;
return page_ext_data(page_ext, &page_owner_ops);
}

static noinline depot_stack_handle_t save_stack(gfp_t flags)
Expand Down

0 comments on commit 1cac4c0

Please sign in to comment.