lkml.org 
[lkml]   [2004]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectSuspend 2 merge: 29/51: Clear swapfile bdev in swapoff.
From
Date
Suspend uses the bdev field as its means of telling which swap devices
are in use. (This info needs to be used at resume time without actually
doing the swapon[s] again). In order to avoid an oops in the suspend
code if the user turns off a swap device, this small addition is
necessary. (If you want the long explanation, feel free to ask!)

diff -ruN 816-clear-swapfile-bdev-in-swapoff-old/mm/swapfile.c 816-clear-swapfile-bdev-in-swapoff-new/mm/swapfile.c
--- 816-clear-swapfile-bdev-in-swapoff-old/mm/swapfile.c 2004-11-06 09:26:59.372699648 +1100
+++ 816-clear-swapfile-bdev-in-swapoff-new/mm/swapfile.c 2004-11-04 16:27:41.000000000 +1100
@@ -1179,6 +1179,7 @@
swap_file = p->swap_file;
p->swap_file = NULL;
p->max = 0;
+ p->bdev = NULL;
swap_map = p->swap_map;
p->swap_map = NULL;
p->flags = 0;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.537 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site