diff options
author | Rob Herring <robh@kernel.org> | 2014-01-17 16:01:27 -0600 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2014-01-17 16:01:27 -0600 |
commit | 361128fcbf30f590a05c8e8789155364f37367db (patch) | |
tree | 7f7973599e286dfd48ea724a5b7fb4bca76b294e /mm/mempolicy.c | |
parent | e2897d7e0b0460dca91b52d55ce41c888363502d (diff) | |
parent | 482c43419fc204b4b658fa4acb80cd502e5fcbac (diff) | |
download | linux-361128fcbf30f590a05c8e8789155364f37367db.tar.bz2 |
Merge remote-tracking branch 'grant/devicetree/next' into for-3.14
Diffstat (limited to 'mm/mempolicy.c')
-rw-r--r-- | mm/mempolicy.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index eca4a3129129..0cd2c4d4e270 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -1197,14 +1197,16 @@ static struct page *new_vma_page(struct page *page, unsigned long private, int * break; vma = vma->vm_next; } + + if (PageHuge(page)) { + if (vma) + return alloc_huge_page_noerr(vma, address, 1); + else + return NULL; + } /* - * queue_pages_range() confirms that @page belongs to some vma, - * so vma shouldn't be NULL. + * if !vma, alloc_page_vma() will use task or system default policy */ - BUG_ON(!vma); - - if (PageHuge(page)) - return alloc_huge_page_noerr(vma, address, 1); return alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, address); } #else @@ -1318,7 +1320,7 @@ static long do_mbind(unsigned long start, unsigned long len, if (nr_failed && (flags & MPOL_MF_STRICT)) err = -EIO; } else - putback_lru_pages(&pagelist); + putback_movable_pages(&pagelist); up_write(&mm->mmap_sem); mpol_out: |