Hugh Dickins 910321ea81 swap: revert special hibernation allocation
Please revert 2.6.36-rc commit d2997b1042ec150616c1963b5e5e919ffd0b0ebf
"hibernation: freeze swap at hibernation".  It complicated matters by
adding a second swap allocation path, just for hibernation; without in any
way fixing the issue that it was intended to address - page reclaim after
fixing the hibernation image might free swap from a page already imaged as
swapcache, letting its swap be reallocated to store a different page of
the image: resulting in data corruption if the imaged page were freed as
clean then swapped back in.  Pages freed to si->swap_map were still in
danger of being reallocated by the alternative allocation path.

I guess it inadvertently fixed slow SSD swap allocation for hibernation,
as reported by Nigel Cunningham: by missing out the discards that occur on
the usual swap allocation path; but that was unintentional, and needs a
separate fix.

Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Ondrej Zary <linux@rainbow-software.org>
Cc: Andrea Gelmini <andrea.gelmini@gmail.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Nigel Cunningham <nigel@tuxonice.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-09 18:57:25 -07:00
..
2009-04-01 08:59:13 -07:00
2010-03-06 11:26:23 -08:00
2010-08-08 21:57:23 +01:00
2010-09-09 18:57:24 -07:00
2010-07-14 17:14:00 +10:00
2010-09-09 18:57:24 -07:00
2009-09-22 07:17:35 -07:00
2010-05-25 08:06:58 -07:00
2010-09-09 09:05:06 -07:00
2010-08-24 12:13:20 -07:00
2010-03-24 16:31:21 -07:00
2010-05-21 18:31:21 -04:00
2010-08-21 08:49:21 -07:00
2007-10-20 01:27:18 +02:00
2010-05-25 08:07:00 -07:00
2010-08-28 13:54:12 -07:00
2010-05-25 15:06:06 +02:00
2009-06-23 12:50:05 -07:00
2010-08-09 20:44:54 -07:00
2010-08-09 20:45:00 -07:00