diff options
author | 2015-08-24 16:36:42 +1000 | |
---|---|---|
committer | 2015-08-24 16:36:42 +1000 | |
commit | 3732ce72b45a2a145803558758821bf198751276 (patch) | |
tree | 75047ed1f43cfd56231535c401924dbb27c4d0f0 /mm/page_alloc.c | |
parent | drm/mgag200: Add support for a new rev of G200e (diff) | |
parent | Linux 4.2-rc8 (diff) | |
download | wireguard-linux-3732ce72b45a2a145803558758821bf198751276.tar.xz wireguard-linux-3732ce72b45a2a145803558758821bf198751276.zip |
Merge tag 'v4.2-rc8' into drm-next
Linux 4.2-rc8
Backmerge required for Intel so they can fix their -next tree up properly.
Diffstat (limited to '')
-rw-r--r-- | mm/page_alloc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index df959b7d6085..5b5240b7f642 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1343,12 +1343,15 @@ static int prep_new_page(struct page *page, unsigned int order, gfp_t gfp_flags, set_page_owner(page, order, gfp_flags); /* - * page->pfmemalloc is set when ALLOC_NO_WATERMARKS was necessary to + * page is set pfmemalloc when ALLOC_NO_WATERMARKS was necessary to * allocate the page. The expectation is that the caller is taking * steps that will free more memory. The caller should avoid the page * being used for !PFMEMALLOC purposes. */ - page->pfmemalloc = !!(alloc_flags & ALLOC_NO_WATERMARKS); + if (alloc_flags & ALLOC_NO_WATERMARKS) + set_page_pfmemalloc(page); + else + clear_page_pfmemalloc(page); return 0; } @@ -3345,7 +3348,7 @@ refill: atomic_add(size - 1, &page->_count); /* reset page count bias and offset to start of new frag */ - nc->pfmemalloc = page->pfmemalloc; + nc->pfmemalloc = page_is_pfmemalloc(page); nc->pagecnt_bias = size; nc->offset = size; } |