From 6dde1396b7d25e2572a8dcef940b856f27d1e54e Mon Sep 17 00:00:00 2001 From: Yu Zhao Date: Sun, 4 Aug 2024 15:36:31 -0600 Subject: [PATCH] mm-swap-remove-boilerplate-fix handle zero-length local_lock_t Link: https://lkml.kernel.org/r/Zq_0X04WsqgUnz30@google.com Signed-off-by: Yu Zhao Reported-by: Hugh Dickins Tested-by: Hugh Dickins Signed-off-by: Andrew Morton --- mm/swap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/swap.c b/mm/swap.c index 4bc08352ad87..67a246772811 100644 --- 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) -- 2.50.1