mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
slab: use memdesc_nid()
We no longer need to convert from slab to folio to get the nid, we can ask memdesc_nid() for the nid directly. Link: https://lkml.kernel.org/r/20250805172307.1302730-7-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Zi Yan <ziy@nvidia.com> Cc: Shakeel Butt <shakeel.butt@linux.dev> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
87479378ac
commit
11afccce2a
|
|
@ -174,12 +174,12 @@ static inline void *slab_address(const struct slab *slab)
|
|||
|
||||
static inline int slab_nid(const struct slab *slab)
|
||||
{
|
||||
return folio_nid(slab_folio(slab));
|
||||
return memdesc_nid(slab->flags);
|
||||
}
|
||||
|
||||
static inline pg_data_t *slab_pgdat(const struct slab *slab)
|
||||
{
|
||||
return folio_pgdat(slab_folio(slab));
|
||||
return NODE_DATA(slab_nid(slab));
|
||||
}
|
||||
|
||||
static inline struct slab *virt_to_slab(const void *addr)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user