Skip to content

Commit b555905

Browse files
Matthew Wilcox (Oracle)tehcaster
authored andcommitted
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) <willy@infradead.org> Reviewed-by: Harry Yoo <harry.yoo@oracle.com> Link: https://patch.msgid.link/20251124142329.1691780-1-willy@infradead.org Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
1 parent 76ade24 commit b555905

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mm/slub.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5149,7 +5149,7 @@ void *alloc_from_pcs(struct kmem_cache *s, gfp_t gfp, int node)
51495149
* be false because of cpu migration during an unlocked part of
51505150
* the current allocation or previous freeing process.
51515151
*/
5152-
if (folio_nid(virt_to_folio(object)) != node) {
5152+
if (page_to_nid(virt_to_page(object)) != node) {
51535153
local_unlock(&s->cpu_sheaves->lock);
51545154
return NULL;
51555155
}

0 commit comments

Comments
 (0)