]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm: remove mlock_count from struct page
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 3 Sep 2025 19:10:39 +0000 (20:10 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 12 Sep 2025 00:25:46 +0000 (17:25 -0700)
All users now use folio->mlock_count so we can remove this element of
struct page.  Move the useful comments over to struct folio.

Link: https://lkml.kernel.org/r/20250903191041.1630338-1-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mm_types.h

index 275e8060d9182edc99fa4c2d03cf6a692aa31f0a..ff2b4e13215f4e05e39b67dfe30fc8e7d210c27d 100644 (file)
@@ -94,14 +94,6 @@ struct page {
                        union {
                                struct list_head lru;
 
-                               /* Or, for the Unevictable "LRU list" slot */
-                               struct {
-                                       /* Always even, to negate PageTail */
-                                       void *__filler;
-                                       /* Count page's or folio's mlocks */
-                                       unsigned int mlock_count;
-                               };
-
                                /* Or, free page */
                                struct list_head buddy_list;
                                struct list_head pcp_list;
@@ -391,7 +383,9 @@ struct folio {
                        union {
                                struct list_head lru;
        /* private: avoid cluttering the output */
+                               /* For the Unevictable "LRU list" slot */
                                struct {
+                                       /* Avoid compound_head */
                                        void *__filler;
        /* public: */
                                        unsigned int mlock_count;