summaryrefslogtreecommitdiff
path: root/mm/swapfile.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-12-05 09:32:11 +0100
committerArd Biesheuvel <ardb@kernel.org>2022-12-07 19:08:57 +0100
commitd9f26ae731259c8fb2d62a742c64e454996944a8 (patch)
tree08a1d422cf241d256acb7e61cb60a9e0c4782278 /mm/swapfile.c
parent29636a5ce87bebab38c533175d72bb800a7581b8 (diff)
parent76dcd734eca23168cb008912c0f69ff408905235 (diff)
downloadlinux-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.c8
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);