diff --git a/mm/swapfile.c b/mm/swapfile.c index d443dea95c27bd060c4a545bcfe39ba722cbe64f..c6c13b050a58c4223464221a61e93a9944aec9f5 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -616,7 +616,7 @@ static unsigned long scan_swap_map(struct swap_info_struct *si, } } offset = si->lowest_bit; - while (++offset < scan_base) { + while (offset < scan_base) { if (!si->swap_map[offset]) { spin_lock(&si->lock); goto checks; @@ -629,6 +629,7 @@ static unsigned long scan_swap_map(struct swap_info_struct *si, cond_resched(); latency_ration = LATENCY_LIMIT; } + offset++; } spin_lock(&si->lock);