Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757507AbcCCKzI (ORCPT ); Thu, 3 Mar 2016 05:55:08 -0500 Received: from mail-wm0-f47.google.com ([74.125.82.47]:36658 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757097AbcCCKzC (ORCPT ); Thu, 3 Mar 2016 05:55:02 -0500 Date: Thu, 3 Mar 2016 13:54:59 +0300 From: "Kirill A. Shutemov" To: Jan Stancek Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, n-horiguchi@ah.jp.nec.com, mike.kravetz@oracle.com, hillf.zj@alibaba-inc.com, kirill.shutemov@linux.intel.com, dave.hansen@linux.intel.com, paul.gortmaker@windriver.com Subject: Re: [PATCH] mm/hugetlb: use EOPNOTSUPP in hugetlb sysctl handlers Message-ID: <20160303105459.GD30948@node.shutemov.name> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1694 Lines: 54 On Thu, Mar 03, 2016 at 11:02:51AM +0100, Jan Stancek wrote: > Replace ENOTSUPP with EOPNOTSUPP. If hugepages are not supported, > this value is propagated to userspace. EOPNOTSUPP is part of uapi > and is widely supported by libc libraries. > > Cc: Andrew Morton > Cc: Naoya Horiguchi > Cc: Mike Kravetz > Cc: Hillf Danton > Cc: "Kirill A. Shutemov" > Cc: Dave Hansen > Cc: Paul Gortmaker > > Signed-off-by: Jan Stancek Acked-by: Kirill A. Shutemov > --- > mm/hugetlb.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > index 01f2b48c8618..851a29928a99 100644 > --- a/mm/hugetlb.c > +++ b/mm/hugetlb.c > @@ -2751,7 +2751,7 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy, > int ret; > > if (!hugepages_supported()) > - return -ENOTSUPP; > + return -EOPNOTSUPP; > > table->data = &tmp; > table->maxlen = sizeof(unsigned long); > @@ -2792,7 +2792,7 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write, > int ret; > > if (!hugepages_supported()) > - return -ENOTSUPP; > + return -EOPNOTSUPP; > > tmp = h->nr_overcommit_huge_pages; > > -- > 1.8.3.1 > > -- > 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 -- Kirill A. Shutemov