From: Oleg Nesterov Date: Thu, 9 Oct 2014 22:27:41 +0000 (-0700) Subject: mempolicy: change alloc_pages_vma() to use mpol_cond_put() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2386740d1add7bb5048c731dd1127a4e9911a3ed;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git mempolicy: change alloc_pages_vma() to use mpol_cond_put() Trivial cleanup. alloc_pages_vma() can use mpol_cond_put(). Signed-off-by: Oleg Nesterov Cc: KAMEZAWA Hiroyuki Cc: David Rientjes Cc: KOSAKI Motohiro Cc: Alexander Viro Cc: Cyrill Gorcunov Cc: "Eric W. Biederman" Cc: "Kirill A. Shutemov" Cc: Peter Zijlstra Cc: Hugh Dickins Cc: Andi Kleen Cc: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 8f5330d74f47..c0c5d388046f 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -2046,8 +2046,7 @@ retry_cpuset: page = __alloc_pages_nodemask(gfp, order, policy_zonelist(gfp, pol, node), policy_nodemask(gfp, pol)); - if (unlikely(mpol_needs_cond_ref(pol))) - __mpol_put(pol); + mpol_cond_put(pol); if (unlikely(!page && read_mems_allowed_retry(cpuset_mems_cookie))) goto retry_cpuset; return page;