Skip to content

Commit ed26552

Browse files
Sourav Pandaakpm00
authored andcommitted
mm/codetag: fix arg in pgalloc_tag_copy alloc_tag_sub
alloc_tag_sub() takes bytes as opposed to number of pages as argument. Currently pgalloc_tag_copy() passes the number of pages. This fix passes the correct unit, which is the number of bytes allocated. Link: https://lkml.kernel.org/r/[email protected] Fixes: e0a955b ("mm/codetag: add pgalloc_tag_copy()") Signed-off-by: Sourav Panda <[email protected]> Acked-by: Suren Baghdasaryan <[email protected]> Reviewed-by: Pasha Tatashin <[email protected]> Reviewed-by: Anshuman Khandual <[email protected]> Cc: Wei Xu <[email protected]> Cc: Yu Zhao <[email protected]> Cc: Kent Overstreet <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 78c018e commit ed26552

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/mm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4207,7 +4207,7 @@ static inline void pgalloc_tag_copy(struct folio *new, struct folio *old)
42074207
/* Clear the old ref to the original allocation tag. */
42084208
clear_page_tag_ref(&old->page);
42094209
/* Decrement the counters of the tag on get_new_folio. */
4210-
alloc_tag_sub(ref, folio_nr_pages(new));
4210+
alloc_tag_sub(ref, folio_size(new));
42114211

42124212
__alloc_tag_ref_set(ref, tag);
42134213

0 commit comments

Comments
 (0)