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: v2.6.14-rc1~977 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dae06ac43d56d23e50a2300d511b32a9e38cd657;p=linux-2.6 [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 f2bc71b9fe..975b1648a8 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