mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-04-02 12:23:49 +00:00
[PATCH] swsusp: fix breakage with swap on LVM
Restore the compatibility with the older code and make it possible to suspend if the kernel command line doesn't contain the "resume=" argument Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
ed3d021b82
commit
a8534adb74
1 changed files with 1 additions and 3 deletions
|
@ -153,13 +153,11 @@ static int swsusp_swap_check(void) /* This is called before saving image */
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!swsusp_resume_device)
|
|
||||||
return -ENODEV;
|
|
||||||
spin_lock(&swap_lock);
|
spin_lock(&swap_lock);
|
||||||
for (i = 0; i < MAX_SWAPFILES; i++) {
|
for (i = 0; i < MAX_SWAPFILES; i++) {
|
||||||
if (!(swap_info[i].flags & SWP_WRITEOK))
|
if (!(swap_info[i].flags & SWP_WRITEOK))
|
||||||
continue;
|
continue;
|
||||||
if (is_resume_device(swap_info + i)) {
|
if (!swsusp_resume_device || is_resume_device(swap_info + i)) {
|
||||||
spin_unlock(&swap_lock);
|
spin_unlock(&swap_lock);
|
||||||
root_swap = i;
|
root_swap = i;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue