Commit b5559055 authored by Matthew Wilcox (Oracle)'s avatar Matthew Wilcox (Oracle) Committed by Vlastimil Babka
Browse files

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: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: default avatarHarry Yoo <harry.yoo@oracle.com>
Link: https://patch.msgid.link/20251124142329.1691780-1-willy@infradead.org


Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
parent 76ade244
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
		}