Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1180327

[PATCH v2 10/10] mm: madvise allow remove operation for hugetlbfs

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Mike Kravetz <mike.kravetz@oracle.com>
Newsgroups linux.kernel
Subject [PATCH v2 10/10] mm: madvise allow remove operation for hugetlbfs
Date Thu, 09 Jul 2015 02:30:02 +0200
Message-ID <pK7SW-1AK-5@gated-at.bofh.it> (permalink)
References <pK7SW-1AK-7@gated-at.bofh.it>
X-Original-To linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org
X-Mailer git-send-email 2.1.0
X-Source-IP aserv0022.oracle.com [141.146.126.234]
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 30
Organization linux.* mail to news gateway
X-Original-Cc Dave Hansen <dave.hansen@linux.intel.com>, Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>, David Rientjes <rientjes@google.com>, Hugh Dickins <hughd@google.com>, Davidlohr Bueso <dave@stgolabs.net>, Aneesh Kumar <aneesh.kumar@linux.vnet.ibm.com>, Hillf Danton <hillf.zj@alibaba-inc.com>, Christoph Hellwig <hch@infradead.org>, Andrew Morton <akpm@linux-foundation.org>, Michal Hocko <mhocko@suse.cz>, Mike Kravetz <mike.kravetz@oracle.com>
X-Original-Date Wed, 8 Jul 2015 17:21:41 -0700
X-Original-Message-ID <1436401301-18839-11-git-send-email-mike.kravetz@oracle.com>
X-Original-References <1436401301-18839-1-git-send-email-mike.kravetz@oracle.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref aioe.org linux.kernel:1180327

Show key headers only | View raw


Now that we have hole punching support for hugetlbfs, we can
also support the MADV_REMOVE interface to it.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
---
 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/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH v2 10/10] mm: madvise allow remove operation for hugetlbfs Mike Kravetz <mike.kravetz@oracle.com> - 2015-07-09 02:30 +0200

csiph-web