diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2023-04-16 12:31:58 -0700 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-04-16 12:31:58 -0700 |
commit | e492cd61b986590a45c674ede7dd1c4dbf94cf24 (patch) | |
tree | 37dc59ea66842b5b7e57f32aba6cbce5143c1282 /mm/swapfile.c | |
parent | d46031f40e0f7f7bf63914bb3f2e404ad3886ecd (diff) | |
parent | 2ff559f31a5d50c31a3f9d849f8af90dc36c7105 (diff) | |
download | linux-e492cd61b986590a45c674ede7dd1c4dbf94cf24.tar.gz linux-e492cd61b986590a45c674ede7dd1c4dbf94cf24.tar.bz2 linux-e492cd61b986590a45c674ede7dd1c4dbf94cf24.zip |
sync mm-stable with mm-hotfixes-stable to pick up depended-upon upstream changes
Diffstat (limited to 'mm/swapfile.c')
-rw-r--r-- | mm/swapfile.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c index 00b3e46becad..274bbf797480 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -679,6 +679,7 @@ static void __del_from_avail_list(struct swap_info_struct *p) { int nid; + assert_spin_locked(&p->lock); for_each_node(nid) plist_del(&p->avail_lists[nid], &swap_avail_heads[nid]); } @@ -2434,8 +2435,8 @@ SYSCALL_DEFINE1(swapoff, const char __user *, specialfile) spin_unlock(&swap_lock); goto out_dput; } - del_from_avail_list(p); spin_lock(&p->lock); + del_from_avail_list(p); if (p->prio < 0) { struct swap_info_struct *si = p; int nid; |