From: Matthew Wilcox (Oracle) Date: Mon, 24 Nov 2025 14:23:27 +0000 (+0000) Subject: slab: Remove unnecessary call to compound_head() in alloc_from_pcs() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b55590558ff7c66c4a494af8ea08999c27594bc8;p=thirdparty%2Flinux.git slab: Remove unnecessary call to compound_head() in alloc_from_pcs() Each page knows which node it belongs to, so there's no need to convert to a folio. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Harry Yoo Link: https://patch.msgid.link/20251124142329.1691780-1-willy@infradead.org Signed-off-by: Vlastimil Babka --- diff --git a/mm/slub.c b/mm/slub.c index 8e5da7b6efe49..25cc3d59337b6 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -5149,7 +5149,7 @@ void *alloc_from_pcs(struct kmem_cache *s, gfp_t gfp, int node) * be false because of cpu migration during an unlocked part of * the current allocation or previous freeing process. */ - if (folio_nid(virt_to_folio(object)) != node) { + if (page_to_nid(virt_to_page(object)) != node) { local_unlock(&s->cpu_sheaves->lock); return NULL; }