Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752009AbbGMEW1 (ORCPT ); Mon, 13 Jul 2015 00:22:27 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:20321 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751934AbbGMEWX (ORCPT ); Mon, 13 Jul 2015 00:22:23 -0400 From: Mike Kravetz To: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org Cc: Dave Hansen , Naoya Horiguchi , David Rientjes , Hugh Dickins , Davidlohr Bueso , Aneesh Kumar , Hillf Danton , Christoph Hellwig , Andrew Morton , Michal Hocko , Mike Kravetz Subject: [PATCH v3 10/10] mm: madvise allow remove operation for hugetlbfs Date: Sun, 12 Jul 2015 21:21:08 -0700 Message-Id: <1436761268-6397-11-git-send-email-mike.kravetz@oracle.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1436761268-6397-1-git-send-email-mike.kravetz@oracle.com> References: <1436761268-6397-1-git-send-email-mike.kravetz@oracle.com> X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 914 Lines: 30 Now that we have hole punching support for hugetlbfs, we can also support the MADV_REMOVE interface to it. Signed-off-by: Dave Hansen Signed-off-by: Mike Kravetz --- mm/madvise.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/madvise.c b/mm/madvise.c index 70ce0d4..a235367 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -468,7 +468,7 @@ static long madvise_remove(struct vm_area_struct *vma, *prev = NULL; /* tell sys_madvise we drop mmap_sem */ - if (vma->vm_flags & (VM_LOCKED | VM_HUGETLB)) + if (vma->vm_flags & VM_LOCKED) return -EINVAL; f = vma->vm_file; -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/