]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
slub: remove use of page->flags
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 26 Mar 2024 17:10:30 +0000 (17:10 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 26 Apr 2024 03:56:15 +0000 (20:56 -0700)
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>
mm/slub.c

index 6437746be03d8e76bae9898752d8fa29fba552a6..e09d8260adff5dbe23b8fff726eb6c5a195702a2 100644 (file)
--- 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