diff --git a/mm/swapfile.c b/mm/swapfile.c index 618358ad464bcecddc66397679d992a5deb27bf0..c291400c4463cd9219535cf7bce78e996cdeba09 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -1429,12 +1429,12 @@ static bool swap_page_trans_huge_swapped(struct swap_info_struct *si, ci = lock_cluster_or_swap_info(si, offset); if (!ci || !cluster_is_huge(ci)) { - if (map[roffset] != SWAP_HAS_CACHE) + if (swap_count(map[roffset])) ret = true; goto unlock_out; } for (i = 0; i < SWAPFILE_CLUSTER; i++) { - if (map[offset + i] != SWAP_HAS_CACHE) { + if (swap_count(map[offset + i])) { ret = true; break; }