mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
[PATCH] fix swap cluster offset
When we've allocated SWAPFILE_CLUSTER pages, ->cluster_next should be the first index of swap cluster. But current code probably sets it wrong offset. Signed-off-by: Akinobu Mita <[email protected]> Acked-by: Hugh Dickins <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
879336c393
commit
9b65ef59d4
1 changed files with 1 additions and 1 deletions
|
|
@ -116,7 +116,7 @@ static inline unsigned long scan_swap_map(struct swap_info_struct *si)
|
|||
last_in_cluster = offset + SWAPFILE_CLUSTER;
|
||||
else if (offset == last_in_cluster) {
|
||||
spin_lock(&swap_lock);
|
||||
si->cluster_next = offset-SWAPFILE_CLUSTER-1;
|
||||
si->cluster_next = offset-SWAPFILE_CLUSTER+1;
|
||||
goto cluster;
|
||||
}
|
||||
if (unlikely(--latency_ration < 0)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue