mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 07:40:53 +07:00
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 <richard.weiyang@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: "Huang, Ying" <ying.huang@intel.com> Cc: Tim Chen <tim.c.chen@linux.intel.com> Cc: Hugh Dickins <hughd@google.com> Link: http://lkml.kernel.org/r/20200421213824.8099-2-richard.weiyang@gmail.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
0fd0e19e4d
commit
fdff1debb9
@ -647,7 +647,7 @@ static bool scan_swap_map_try_ssd_cluster(struct swap_info_struct *si,
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user