Skip to content

Commit 7d26842

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

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

mm/slab_common.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1615,17 +1615,15 @@ static void kfree_rcu_work(struct work_struct *work)
16151615
static bool kfree_rcu_sheaf(void *obj)
16161616
{
16171617
struct kmem_cache *s;
1618-
struct folio *folio;
16191618
struct slab *slab;
16201619

16211620
if (is_vmalloc_addr(obj))
16221621
return false;
16231622

1624-
folio = virt_to_folio(obj);
1625-
if (unlikely(!folio_test_slab(folio)))
1623+
slab = virt_to_slab(obj);
1624+
if (unlikely(!slab))
16261625
return false;
16271626

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

0 commit comments

Comments
 (0)