lkml.org 
[lkml]   [2016]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] mm/hugetlb: use EOPNOTSUPP in hugetlb sysctl handlers
    Date
    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>
    ---
    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
    \
     
     \ /
      Last update: 2016-03-03 11:41    [W:2.986 / U:0.100 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site