diff options
| author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2025-08-05 18:22:56 +0100 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2025-09-13 16:55:08 -0700 |
| commit | 11afccce2ac5fd1ea5e6f0d251e746df782c8cfe (patch) | |
| tree | 22818336da65ad3a94b20dabd026ba9102cba98a /mm/slab.h | |
| parent | 87479378acdd79a0ac84be0b823e37e3816433d9 (diff) | |
| download | tip-11afccce2ac5fd1ea5e6f0d251e746df782c8cfe.tar.gz | |
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>
Diffstat (limited to 'mm/slab.h')
| -rw-r--r-- | mm/slab.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/slab.h b/mm/slab.h index 7757331e7c80f5..c41a512dd07cc3 100644 --- a/mm/slab.h +++ b/mm/slab.h @@ -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) |
