]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm/munlock: remove fields to fix htmldocs warnings
authorHugh Dickins <hughd@google.com>
Thu, 14 Apr 2022 06:06:53 +0000 (23:06 -0700)
committerakpm <akpm@linux-foundation.org>
Thu, 14 Apr 2022 06:06:53 +0000 (23:06 -0700)
Stephen reports that 'make htmldocs' currently issues two warnings:

include/linux/mm_types.h:275: warning: Function parameter or member
'__filler' not described in 'folio'
include/linux/mm_types.h:275: warning: Function parameter or member
'mlock_count' not described in 'folio'

Certainly __filler doesn't want documenting there, and all but one use of
mlock_count is through page->mlock_count at present: so I think it's best
just to remove them both from struct folio for now, and sort out the right
way to document folio->mlock_count once that is the one true way.

Link: https://lkml.kernel.org/r/d2c8f66d-be8e-7c91-b0c8-b2f7ffb08bec@google.com
Fixes: 07ca76067308 ("mm/munlock: maintain page->mlock_count while unevictable")
Signed-off-by: Hugh Dickins <hughd@google.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mm_types.h
mm/swap.c

index 8834e38c06a4fc163bb40f01370b3457e11af532..444fe386a1db76bc7f676c111e0e4d61b49265f3 100644 (file)
@@ -253,13 +253,7 @@ struct folio {
                struct {
        /* public: */
                        unsigned long flags;
-                       union {
-                               struct list_head lru;
-                               struct {
-                                       void *__filler;
-                                       unsigned int mlock_count;
-                               };
-                       };
+                       struct list_head lru;
                        struct address_space *mapping;
                        pgoff_t index;
                        void *private;
index 7e320ec08c6ae2d938cd02e894b674decf913160..fa3b48646976ce9e74963fdf8d556b76b2ab9c2d 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -1028,13 +1028,13 @@ static void __pagevec_lru_add_fn(struct folio *folio, struct lruvec *lruvec)
                folio_clear_active(folio);
                folio_set_unevictable(folio);
                /*
-                * folio->mlock_count = !!folio_test_mlocked(folio)?
+                * page->mlock_count = !!PageMlocked(page)?
                 * But that leaves __mlock_page() in doubt whether another
                 * actor has already counted the mlock or not.  Err on the
                 * safe side, underestimate, let page reclaim fix it, rather
                 * than leaving a page on the unevictable LRU indefinitely.
                 */
-               folio->mlock_count = 0;
+               folio_page(folio, 0)->mlock_count = 0;
                if (!was_unevictable)
                        __count_vm_events(UNEVICTABLE_PGCULLED, nr_pages);
        }