Skip to content

Commit 2443fb5

Browse files
Matthew Wilcox (Oracle)akpm00
authored andcommitted
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>
1 parent 8014c46 commit 2443fb5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

mm/slab_common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -979,9 +979,9 @@ void free_large_kmalloc(struct folio *folio, void *object)
979979
kasan_kfree_large(object);
980980
kmsan_kfree_large(object);
981981

982-
mod_lruvec_page_state(folio_page(folio, 0), NR_SLAB_UNRECLAIMABLE_B,
982+
lruvec_stat_mod_folio(folio, NR_SLAB_UNRECLAIMABLE_B,
983983
-(PAGE_SIZE << order));
984-
__free_pages(folio_page(folio, 0), order);
984+
folio_put(folio);
985985
}
986986

987987
static void *__kmalloc_large_node(size_t size, gfp_t flags, int node);

0 commit comments

Comments
 (0)