Commit ed265529 authored by Sourav Panda's avatar Sourav Panda Committed by Andrew Morton
Browse files

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/20241022232440.334820-1-souravpanda@google.com


Fixes: e0a955bf ("mm/codetag: add pgalloc_tag_copy()")
Signed-off-by: default avatarSourav Panda <souravpanda@google.com>
Acked-by: default avatarSuren Baghdasaryan <surenb@google.com>
Reviewed-by: default avatarPasha Tatashin <pasha.tatashin@soleen.com>
Reviewed-by: default avatarAnshuman Khandual <anshuman.khandual@arm.com>
Cc: Wei Xu <weixugc@google.com>
Cc: Yu Zhao <yuzhao@google.com>
Cc: Kent Overstreet <kent.overstreet@linux.dev>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 78c018e3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4207,7 +4207,7 @@ static inline void pgalloc_tag_copy(struct folio *new, struct folio *old)
	/* Clear the old ref to the original allocation tag. */
	clear_page_tag_ref(&old->page);
	/* Decrement the counters of the tag on get_new_folio. */
	alloc_tag_sub(ref, folio_nr_pages(new));
	alloc_tag_sub(ref, folio_size(new));

	__alloc_tag_ref_set(ref, tag);