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

slab: Remove folio references from kfree_rcu_sheaf()



In preparation for splitting struct slab from struct page and struct
folio, remove mentions of struct folio from this function.  Since
we don't need to handle large kmalloc objects specially here, we
can just use virt_to_slab().

Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Link: https://patch.msgid.link/20251113000932.1589073-12-willy@infradead.org


Reviewed-by: default avatarHarry Yoo <harry.yoo@oracle.com>
Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
parent 4a2c2110
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1615,17 +1615,15 @@ static void kfree_rcu_work(struct work_struct *work)
static bool kfree_rcu_sheaf(void *obj)
{
	struct kmem_cache *s;
	struct folio *folio;
	struct slab *slab;

	if (is_vmalloc_addr(obj))
		return false;

	folio = virt_to_folio(obj);
	if (unlikely(!folio_test_slab(folio)))
	slab = virt_to_slab(obj);
	if (unlikely(!slab))
		return false;

	slab = folio_slab(folio);
	s = slab->slab_cache;
	if (s->cpu_sheaves) {
		if (likely(!IS_ENABLED(CONFIG_NUMA) ||