commit | b73d7fcecd93dc15eaa3c45c8c587b613f6673c4 | [log] [tgz] |
---|---|---|
author | Hugh Dickins <[email protected]> | Thu Sep 09 16:38:09 2010 -0700 |
committer | Linus Torvalds <[email protected]> | Thu Sep 09 18:57:25 2010 -0700 |
tree | ebf5a5e10fb246237807317a81f6f40c3eebcd9c | |
parent | 910321ea817a202ff70fac666e37e2c8e2f88823 [diff] |
swap: prevent reuse during hibernation Move the hibernation check from scan_swap_map() into try_to_free_swap(): to catch not only the common case when hibernation's allocation itself triggers swap reuse, but also the less likely case when concurrent page reclaim (shrink_page_list) might happen to try_to_free_swap from a page. Hibernation already clears __GFP_IO from the gfp_allowed_mask, to stop reclaim from going to swap: check that to prevent swap reuse too. Signed-off-by: Hugh Dickins <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Ondrej Zary <[email protected]> Cc: Andrea Gelmini <[email protected]> Cc: Balbir Singh <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: Nigel Cunningham <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>