Skip to content

Commit fd8acc0

Browse files
surenbaghdasaryanakpm00
authored andcommitted
lib: reuse page_ext_data() to obtain codetag_ref
codetag_ref_from_page_ext() reimplements the same calculation as page_ext_data(). Reuse existing function instead. Link: https://lkml.kernel.org/r/[email protected] Fixes: dcfe378 ("lib: introduce support for page allocation tagging") Signed-off-by: Suren Baghdasaryan <[email protected]> Cc: Kees Cook <[email protected]> Cc: Kent Overstreet <[email protected]> Cc: Pasha Tatashin <[email protected]> Cc: Sourav Panda <[email protected]> Cc: Vlastimil Babka <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 4810a82 commit fd8acc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/pgalloc_tag.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ extern struct page_ext_operations page_alloc_tagging_ops;
1515

1616
static inline union codetag_ref *codetag_ref_from_page_ext(struct page_ext *page_ext)
1717
{
18-
return (void *)page_ext + page_alloc_tagging_ops.offset;
18+
return (union codetag_ref *)page_ext_data(page_ext, &page_alloc_tagging_ops);
1919
}
2020

2121
static inline struct page_ext *page_ext_from_codetag_ref(union codetag_ref *ref)

0 commit comments

Comments
 (0)