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


Groups > linux.kernel > #1349676

Re: [PATCH] mm/hugetlb: use EOPNOTSUPP in hugetlb sysctl handlers

From Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Newsgroups linux.kernel
Subject Re: [PATCH] mm/hugetlb: use EOPNOTSUPP in hugetlb sysctl handlers
Date 2016-03-04 00:10 +0100
Message-ID <r8Kxz-63E-3@gated-at.bofh.it> (permalink)
References <r8ymJ-5pr-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <akpm@linux-foundation.org>
> Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
> Cc: Mike Kravetz <mike.kravetz@oracle.com>
> Cc: Hillf Danton <hillf.zj@alibaba-inc.com>
> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
> 
> Signed-off-by: Jan Stancek <jstancek@redhat.com>

Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>

> ---
>  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
> 

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


Thread

[PATCH] mm/hugetlb: use EOPNOTSUPP in hugetlb sysctl handlers Jan Stancek <jstancek@redhat.com> - 2016-03-03 11:10 +0100
  Re: [PATCH] mm/hugetlb: use EOPNOTSUPP in hugetlb sysctl handlers "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-03-03 12:00 +0100
  Re: [PATCH] mm/hugetlb: use EOPNOTSUPP in hugetlb sysctl handlers Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> - 2016-03-04 00:10 +0100
  Re: [PATCH] mm/hugetlb: use EOPNOTSUPP in hugetlb sysctl handlers Andrew Morton <akpm@linux-foundation.org> - 2016-03-04 22:40 +0100
    Re: [PATCH] mm/hugetlb: use EOPNOTSUPP in hugetlb sysctl handlers Jan Stancek <jstancek@redhat.com> - 2016-03-05 09:20 +0100
      Re: [PATCH] mm/hugetlb: use EOPNOTSUPP in hugetlb sysctl handlers Andrew Morton <akpm@linux-foundation.org> - 2016-03-08 01:20 +0100
  Re: [PATCH] mm/hugetlb: use EOPNOTSUPP in hugetlb sysctl handlers David Rientjes <rientjes@google.com> - 2016-03-07 23:20 +0100
    Re: [PATCH] mm/hugetlb: use EOPNOTSUPP in hugetlb sysctl handlers "Hillf Danton" <hillf.zj@alibaba-inc.com> - 2016-03-08 04:10 +0100

csiph-web