projects
/
users
/
jedix
/
linux-maple.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
952d7f0
)
swapfile rcu fix
maple_spf
author
Liam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 16 Mar 2021 20:00:31 +0000
(16:00 -0400)
committer
Liam R. Howlett <Liam.Howlett@Oracle.com>
Tue, 16 Mar 2021 20:00:31 +0000
(16:00 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
mm/swapfile.c
patch
|
blob
|
history
diff --git
a/mm/swapfile.c
b/mm/swapfile.c
index 3992959c087251c2fa1bd42c7eb9666c545d01d1..5c2a2615e83547268e4cada9f085643117cfe623 100644
(file)
--- a/
mm/swapfile.c
+++ b/
mm/swapfile.c
@@
-2105,6
+2105,7
@@
static int unuse_mm(struct mm_struct *mm, unsigned int type,
MA_STATE(mas, &mm->mm_mt, 0, 0);
mmap_read_lock(mm);
+ mas_lock(&mas);
mas_for_each(&mas, vma, ULONG_MAX) {
if (vma->anon_vma) {
ret = unuse_vma(vma, type, frontswap,
@@
-2112,8
+2113,13
@@
static int unuse_mm(struct mm_struct *mm, unsigned int type,
if (ret)
break;
}
+
+ mas_unlock(&mas);
+ mas_pause(&mas);
cond_resched();
+ mas_lock(&mas);
}
+ mas_unlock(&mas);
mmap_read_unlock(mm);
return ret;
}