From fdff1debb9650ea43617487500f48168ce432cb7 Mon Sep 17 00:00:00 2001 From: Wei Yang Date: Mon, 1 Jun 2020 21:49:04 -0700 Subject: mm/swapfile.c: tmp is always smaller than max If tmp is bigger or equal to max, we would jump to new_cluster. Return true directly. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Reviewed-by: "Huang, Ying" Cc: Tim Chen Cc: Hugh Dickins Link: http://lkml.kernel.org/r/20200421213824.8099-2-richard.weiyang@gmail.com Signed-off-by: Linus Torvalds --- mm/swapfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/swapfile.c b/mm/swapfile.c index 263e3d86a114..c74c9e1dc50d 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -647,7 +647,7 @@ new_cluster: cluster->next = tmp + 1; *offset = tmp; *scan_base = tmp; - return tmp < max; + return true; } static void __del_from_avail_list(struct swap_info_struct *p) -- cgit v1.2.3