mm, hugetlb: remove useless check about mapping type
authorJoonsoo Kim <[email protected]>
Wed, 11 Sep 2013 21:21:55 +0000 (14:21 -0700)
committerLinus Torvalds <[email protected]>
Wed, 11 Sep 2013 22:57:44 +0000 (15:57 -0700)
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 <[email protected]>
Cc: Aneesh Kumar <[email protected]>
Cc: Naoya Horiguchi <[email protected]>
Reviewed-by: Davidlohr Bueso <[email protected]>
Cc: David Gibson <[email protected]>
Cc: Wanpeng Li <[email protected]>
Cc: Hillf Danton <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/hugetlb.c

index dec5772c8c5c8fd35b3f1d665252e7845468f3b0..f6347ec4fd0a37898361cd410c1488444b912947 100644 (file)
@@ -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;