mm/vmscan: restore sc->gfp_mask after promoting it to __GFP_HIGHMEM
authorWeijie Yang <weijie.yang@samsung.com>
Mon, 7 Apr 2014 22:36:59 +0000 (15:36 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 7 Apr 2014 23:35:50 +0000 (16:35 -0700)
commit619d0d76c1ee943f171c7d4fc021ec7602388579
tree1a2bff9a01509f95031157f3a84b44dead8e7d3f
parenta5338093bfb462256f70f3450c08f73e59543e26
mm/vmscan: restore sc->gfp_mask after promoting it to __GFP_HIGHMEM

We promote sc->gfp_mask to __GFP_HIGHMEM to forcibly scan highmem if
there are too many buffer_heads pinning highmem.  See cc715d99e5 ("mm:
vmscan: forcibly scan highmem if there are too many buffer_heads pinning
highmem").

This patch restores sc->gfp_mask to its caller original value after
finishing the scan job, to avoid the impact on other invocations from
its upper caller, such as vmpressure_prio(), shrink_slab().

Signed-off-by: Weijie Yang <weijie.yang@samsung.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/vmscan.c