From fb20654f392b8b5cb50dbecb5955b51be6d6ae62 Mon Sep 17 00:00:00 2001 From: Joonsoo Kim Date: Wed, 11 Sep 2013 14:21:55 -0700 Subject: [PATCH] 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 Cc: Aneesh Kumar Cc: Naoya Horiguchi Reviewed-by: Davidlohr Bueso Cc: David Gibson Cc: Wanpeng Li Cc: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds (cherry picked from commit 5944d0116c773319a48ea6812d1891aa6d0bbbbf) Signed-off-by: Mark Brown --- mm/hugetlb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 92a0ce4f8bc5..f0a9e32c75b4 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2547,8 +2547,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; -- 2.34.1