]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm-swap-remove-boilerplate-fix
authorYu Zhao <yuzhao@google.com>
Sun, 4 Aug 2024 21:36:31 +0000 (15:36 -0600)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 17 Aug 2024 00:52:33 +0000 (17:52 -0700)
handle zero-length local_lock_t

Link: https://lkml.kernel.org/r/Zq_0X04WsqgUnz30@google.com
Signed-off-by: Yu Zhao <yuzhao@google.com>
Reported-by: Hugh Dickins <hughd@google.com>
Tested-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/swap.c

index 4bc08352ad87d347bc27cdf77fb4bb9e715b3a32..67a246772811bb0120927ec8919d6789bc3aa311 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -254,7 +254,7 @@ static void __folio_batch_add_and_move(struct folio_batch __percpu *fbatch,
                folio,                                                                          \
                op,                                                                             \
                on_lru,                                                                         \
-               offsetof(struct cpu_fbatches, op) > offsetof(struct cpu_fbatches, lock_irq)     \
+               offsetof(struct cpu_fbatches, op) >= offsetof(struct cpu_fbatches, lock_irq)    \
        )
 
 static void lru_move_tail(struct lruvec *lruvec, struct folio *folio)