From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f176.google.com (mail-ob0-f176.google.com [209.85.214.176]) by kanga.kvack.org (Postfix) with ESMTP id CA3FE6B0082 for ; Thu, 23 Apr 2015 18:14:10 -0400 (EDT) Received: by obcux3 with SMTP id ux3so24759207obc.2 for ; Thu, 23 Apr 2015 15:14:10 -0700 (PDT) Received: from aserp1040.oracle.com (aserp1040.oracle.com. [141.146.126.69]) by mx.google.com with ESMTPS id 6si3664529oid.119.2015.04.23.15.14.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Apr 2015 15:14:08 -0700 (PDT) From: Mike Kravetz Subject: [RFC v2 PATCH 5/5] mm: madvise allow remove operation for hugetlbfs Date: Thu, 23 Apr 2015 15:13:17 -0700 Message-Id: <1429827197-677-6-git-send-email-mike.kravetz@oracle.com> In-Reply-To: <1429827197-677-1-git-send-email-mike.kravetz@oracle.com> References: <1429827197-677-1-git-send-email-mike.kravetz@oracle.com> Sender: owner-linux-mm@kvack.org List-ID: To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Dave Hansen , Naoya Horiguchi , David Rientjes , Hugh Dickins , Davidlohr Bueso , Aneesh Kumar , Hillf Danton , Christoph Hellwig , Mike Kravetz 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 d551475..c4a1027 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -299,7 +299,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, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org