Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752856AbbDBWWe (ORCPT ); Thu, 2 Apr 2015 18:22:34 -0400 Received: from mail-ig0-f174.google.com ([209.85.213.174]:32948 "EHLO mail-ig0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752274AbbDBWVx (ORCPT ); Thu, 2 Apr 2015 18:21:53 -0400 Date: Thu, 2 Apr 2015 15:21:50 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: mtk.manpages@gmail.com cc: Andrew Morton , "Kirill A. Shutemov" , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-man@vger.kernel.org Subject: [patch] madvise.2: specify MADV_REMOVE returns EINVAL for hugetlbfs Message-ID: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1098 Lines: 32 madvise(2) actually returns with error EINVAL for MADV_REMOVE when used for hugetlb vmas, not EOPNOTSUPP, and this has been the case since MADV_REMOVE was introduced in commit f6b3ec238d12 ("madvise(MADV_REMOVE): remove pages from tmpfs shm backing store"). Specify the exact behavior. Signed-off-by: David Rientjes --- man2/madvise.2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/man2/madvise.2 b/man2/madvise.2 index a3d93bb..00db39d 100644 --- a/man2/madvise.2 +++ b/man2/madvise.2 @@ -184,7 +184,9 @@ any filesystem which supports the .BR FALLOC_FL_PUNCH_HOLE mode also supports .BR MADV_REMOVE . -Other filesystems fail with the error +Hugetlbfs will fail with the error +.BR EINVAL +and other filesystems fail with the error .BR EOPNOTSUPP . .TP .BR MADV_DONTFORK " (since Linux 2.6.16)" -- 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/