summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-03-26 20:10:30 +0300
committerAndrew Morton <akpm@linux-foundation.org>2024-04-26 06:56:15 +0300
commit5e0debe012f31d6409b840920d0c37396d32ce30 (patch)
treef898b8a366ec763aed97d27daf5762f513b75005
parent51718e25c53f58fe9fa515f219367632cce4914d (diff)
downloadlinux-5e0debe012f31d6409b840920d0c37396d32ce30.tar.xz
slub: remove use of page->flags
Use slub->__page_flags instead. We can also remove the assertion that it's not a tail page as struct slab never points to a tail page. Link: https://lkml.kernel.org/r/20240326171045.410737-9-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--mm/slub.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 6437746be03d..e09d8260adff 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -616,18 +616,12 @@ slub_set_cpu_partial(struct kmem_cache *s, unsigned int nr_objects)
*/
static __always_inline void slab_lock(struct slab *slab)
{
- struct page *page = slab_page(slab);
-
- VM_BUG_ON_PAGE(PageTail(page), page);
- bit_spin_lock(PG_locked, &page->flags);
+ bit_spin_lock(PG_locked, &slab->__page_flags);
}
static __always_inline void slab_unlock(struct slab *slab)
{
- struct page *page = slab_page(slab);
-
- VM_BUG_ON_PAGE(PageTail(page), page);
- bit_spin_unlock(PG_locked, &page->flags);
+ bit_spin_unlock(PG_locked, &slab->__page_flags);
}
static inline bool