From: Joonsoo Kim Date: Wed, 11 Sep 2013 21:21:55 +0000 (-0700) Subject: mm, hugetlb: remove useless check about mapping type X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5944d0116c773319a48ea6812d1891aa6d0bbbbf;p=openwrt%2Fstaging%2Fblogic.git 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 --- diff --git a/mm/hugetlb.c b/mm/hugetlb.c index dec5772c8c5c..f6347ec4fd0a 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2564,8 +2564,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;