summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2023-12-28 08:57:45 +0000
committerAndrew Morton <akpm@linux-foundation.org>2024-01-05 10:17:46 -0800
commit2443fb5bec4ff1dda4670e47ceb9ef8c05a06412 (patch)
tree54aaae368558f85d0b7bf491f4be086462b89269 /mm
parent8014c46ad991f05b15ffbc0c6ae130bdf911187b (diff)
slub: use folio APIs in free_large_kmalloc()
Save a few calls to compound_head() by using the folio APIs directly. Link: https://lkml.kernel.org/r/20231228085748.1083901-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Acked-by: David Rientjes <rientjes@google.com> Reviewed-by: Vlastimil Babka <vbabka@suse.cz> Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/slab_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 8d431193c273..66f0b3531800 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -979,9 +979,9 @@ void free_large_kmalloc(struct folio *folio, void *object)
kasan_kfree_large(object);
kmsan_kfree_large(object);
- mod_lruvec_page_state(folio_page(folio, 0), NR_SLAB_UNRECLAIMABLE_B,
+ lruvec_stat_mod_folio(folio, NR_SLAB_UNRECLAIMABLE_B,
-(PAGE_SIZE << order));
- __free_pages(folio_page(folio, 0), order);
+ folio_put(folio);
}
static void *__kmalloc_large_node(size_t size, gfp_t flags, int node);