X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=mm%2Fswapfile.c;h=221c4c77bb7c2fd18b73de780205c34caf3dee6a;hp=fad1830ddda5d07b5679cf28df5808d93d5cc440;hb=refs%2Fheads%2Fpandora-3.2-cma2;hpb=e0254df58aa9a0eede8b7f8dc1cb453e8f1e6b5c diff --git a/mm/swapfile.c b/mm/swapfile.c index fad1830ddda5..221c4c77bb7c 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -667,10 +667,10 @@ int try_to_free_swap(struct page *page) * original page might be freed under memory pressure, then * later read back in from swap, now with the wrong data. * - * Hibernation clears bits from gfp_allowed_mask to prevent - * memory reclaim from writing to disk, so check that here. + * Hibration suspends storage while it is writing the image + * to disk so check that here. */ - if (!(gfp_allowed_mask & __GFP_IO)) + if (pm_suspended_storage()) return 0; delete_from_swap_cache(page);