aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2009-01-06 17:39:48 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 18:59:05 -0500
commit22c6f8fdb31993cf49bdd4a47b64a7002391e1c7 (patch)
tree4721575904bc220bed559efb95f04f32a1febbfe /mm
parent73fd8748ab0b9b3ddd178bea1d7ae03372033d96 (diff)
swapfile: remove SWP_ACTIVE mask
Remove the SWP_ACTIVE mask: it just obscures the SWP_WRITEOK flag. Signed-off-by: Hugh Dickins <hugh@veritas.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/swapfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c
index e2adc8eb9317..915cb3fc43d7 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -1222,7 +1222,7 @@ asmlinkage long sys_swapoff(const char __user * specialfile)
1222 spin_lock(&swap_lock); 1222 spin_lock(&swap_lock);
1223 for (type = swap_list.head; type >= 0; type = swap_info[type].next) { 1223 for (type = swap_list.head; type >= 0; type = swap_info[type].next) {
1224 p = swap_info + type; 1224 p = swap_info + type;
1225 if ((p->flags & SWP_ACTIVE) == SWP_ACTIVE) { 1225 if (p->flags & SWP_WRITEOK) {
1226 if (p->swap_file->f_mapping == mapping) 1226 if (p->swap_file->f_mapping == mapping)
1227 break; 1227 break;
1228 } 1228 }
@@ -1674,7 +1674,7 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags)
1674 else 1674 else
1675 p->prio = --least_priority; 1675 p->prio = --least_priority;
1676 p->swap_map = swap_map; 1676 p->swap_map = swap_map;
1677 p->flags = SWP_ACTIVE; 1677 p->flags |= SWP_WRITEOK;
1678 nr_swap_pages += nr_good_pages; 1678 nr_swap_pages += nr_good_pages;
1679 total_swap_pages += nr_good_pages; 1679 total_swap_pages += nr_good_pages;
1680 1680