diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2022-12-05 09:32:11 +0100 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2022-12-07 19:08:57 +0100 |
commit | d9f26ae731259c8fb2d62a742c64e454996944a8 (patch) | |
tree | 08a1d422cf241d256acb7e61cb60a9e0c4782278 /mm/swapfile.c | |
parent | 29636a5ce87bebab38c533175d72bb800a7581b8 (diff) | |
parent | 76dcd734eca23168cb008912c0f69ff408905235 (diff) | |
download | linux-next-d9f26ae731259c8fb2d62a742c64e454996944a8.tar.gz |
Merge tag 'v6.1-rc8' into efi/next
Linux 6.1-rc8
Diffstat (limited to 'mm/swapfile.c')
-rw-r--r-- | mm/swapfile.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c index 5fc1237a9f21..72e481aacd5d 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -973,23 +973,23 @@ done: scan: spin_unlock(&si->lock); while (++offset <= READ_ONCE(si->highest_bit)) { - if (swap_offset_available_and_locked(si, offset)) - goto checks; if (unlikely(--latency_ration < 0)) { cond_resched(); latency_ration = LATENCY_LIMIT; scanned_many = true; } + if (swap_offset_available_and_locked(si, offset)) + goto checks; } offset = si->lowest_bit; while (offset < scan_base) { - if (swap_offset_available_and_locked(si, offset)) - goto checks; if (unlikely(--latency_ration < 0)) { cond_resched(); latency_ration = LATENCY_LIMIT; scanned_many = true; } + if (swap_offset_available_and_locked(si, offset)) + goto checks; offset++; } spin_lock(&si->lock); |