diff options
authorJoonsoo Kim <iamjoonsoo.kim@lge.com>2013-09-11 14:21:55 -0700
committerMark Brown <broonie@linaro.org>2014-06-12 16:10:27 +0100
commitffb684469290a85ce0eb83162b5138f1e3b71d2d (patch)
parentd0e74988fdeaa6038417f41e720479aa461cc13a (diff)
mm, hugetlb: remove useless check about mapping type
is_vma_resv_set(vma, HPAGE_RESV_OWNER) implys that this mapping is for private. So we don't need to check whether this mapping is for shared or not. This patch is just for clean-up. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Aneesh Kumar <aneesh.kumar@linux.vnet.ibm.com> Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Reviewed-by: Davidlohr Bueso <davidlohr@hp.com> Cc: David Gibson <david@gibson.dropbear.id.au> Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com> Cc: Hillf Danton <dhillf@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 5944d0116c773319a48ea6812d1891aa6d0bbbbf) Signed-off-by: Mark Brown <broonie@linaro.org>
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 15148324e7fe..83abac5f41ce 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -2558,8 +2558,7 @@ retry_avoidcopy:
* at the time of fork() could consume its reserves on COW instead
* of the full address range.
- if (!(vma->vm_flags & VM_MAYSHARE) &&
- is_vma_resv_set(vma, HPAGE_RESV_OWNER) &&
+ if (is_vma_resv_set(vma, HPAGE_RESV_OWNER) &&
old_page != pagecache_page)
outside_reserve = 1;