Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6856
b: refs/heads/master
c: dae06ac
h: refs/heads/master
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Sep 5, 2005
1 parent 67c37ef commit 794b0d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5d337b9194b1ce3b6fd5f3cb2799455ed2f9a3d1
refs/heads/master: dae06ac43d56d23e50a2300d511b32a9e38cd657
12 changes: 6 additions & 6 deletions trunk/kernel/power/swsusp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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<MAX_SWAPFILES; i++) {
if (swap_info[i].flags == 0) {
if (!(swap_info[i].flags & SWP_WRITEOK)) {
swapfile_used[i]=SWAPFILE_UNUSED;
} else {
if (!len) {
Expand All @@ -202,7 +202,7 @@ static int swsusp_swap_check(void) /* This is called before saving image */
}
}
}
swap_list_unlock();
spin_unlock(&swap_lock);
return (root_swap != 0xffff) ? 0 : -ENODEV;
}

Expand All @@ -216,12 +216,12 @@ static void lock_swapdevices(void)
{
int i;

swap_list_lock();
spin_lock(&swap_lock);
for (i = 0; i< MAX_SWAPFILES; i++)
if (swapfile_used[i] == SWAPFILE_IGNORED) {
swap_info[i].flags ^= 0xFF;
swap_info[i].flags ^= SWP_WRITEOK;
}
swap_list_unlock();
spin_unlock(&swap_lock);
}

/**
Expand Down

0 comments on commit 794b0d5

Please sign in to comment.