mm/codetag: fix arg in pgalloc_tag_copy alloc_tag_sub
Subsystems (2)
PATCH v2 1/1 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.
---
Changelog:
Added Acked-by: Suren Baghdasaryan <[email protected]> Added Reviewed-by: Pasha Tatashin <[email protected]> Fixed the nit pointed by Wei in the commit message
v1:
https://lore.kernel.org/all/[email protected]/
--- include/linux/mm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/mm.h +1 -1
@@ -4203,7 +4203,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);
Signature · 1 line
2.47.0.105.g07ac214952-goog
Quoted 5 lines · Sourav Panda
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.
Quoted 8 lines
Fixes e0a955bf7f61 ("mm/codetag: add pgalloc_tag_copy()")Signed-off-by Sourav Panda <[email protected]>Reviewed-by Pasha Tatashin <[email protected]>---
Changelog:
Added Acked-by: Suren Baghdasaryan <[email protected]> Added Reviewed-by: Pasha Tatashin <[email protected]>
Very minor nit.
Just mentioning that the tags have been picked up should suffice.
Quoted 13 lines
Fixed the nit pointed by Wei in the commit message
v1:
https://lore.kernel.org/all/[email protected]/--- include/linux/mm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/mm.h +0
-0
include/linux/mm.h static inline void pgalloc_tag_copy(struct folio *new, struct folio *old) · line 4209
Quoted 8 lines
include/linux/mm.h +1
-1@@ -4203,7 +4203,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);