From: Hugh Dickins Date: Sat, 3 Sep 2005 22:54:42 +0000 (-0700) Subject: [PATCH] swap: update swsusp use of swap_info X-Git-Tag: Ubuntu-5.10.0-12.13~60832 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=dae06ac43d56d23e50a2300d511b32a9e38cd657;p=mirror_ubuntu-hirsute-kernel.git [PATCH] swap: update swsusp use of swap_info Aha, swsusp dips into swap_info[], better update it to swap_lock. It's bitflipping flags with 0xFF, so get_swap_page will allocate from only the one chosen device: let's change that to flip SWP_WRITEOK. Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c index f2bc71b9fe8b..975b1648a806 100644 --- a/kernel/power/swsusp.c +++ b/kernel/power/swsusp.c @@ -179,9 +179,9 @@ static int swsusp_swap_check(void) /* This is called before saving image */ len=strlen(resume_file); root_swap = 0xFFFF; - swap_list_lock(); + spin_lock(&swap_lock); for (i=0; i