https://github.com/torvalds/linux
Revision 86613628b3d367743f71b945c203774c522404f4 authored by Jan Stancek on 09 March 2016, 22:08:35 UTC, committed by Linus Torvalds on 09 March 2016, 23:43:42 UTC
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.

It gives nicer message to user, rather than:

  # cat /proc/sys/vm/nr_hugepages
  cat: /proc/sys/vm/nr_hugepages: Unknown error 524

And also LTP's proc01 test was failing because this ret code (524)
was unexpected:

  proc01      1  TFAIL  :  proc01.c:396: read failed: /proc/sys/vm/nr_hugepages: errno=???(524): Unknown error 524
  proc01      2  TFAIL  :  proc01.c:396: read failed: /proc/sys/vm/nr_hugepages_mempolicy: errno=???(524): Unknown error 524
  proc01      3  TFAIL  :  proc01.c:396: read failed: /proc/sys/vm/nr_overcommit_hugepages: errno=???(524): Unknown error 524

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent ac343e8
History
Tip revision: 86613628b3d367743f71b945c203774c522404f4 authored by Jan Stancek on 09 March 2016, 22:08:35 UTC
mm/hugetlb: use EOPNOTSUPP in hugetlb sysctl handlers
Tip revision: 8661362
File Mode Size
README.dvb-usb -rw-r--r-- 9.7 KB
avermedia.txt -rw-r--r-- 13.6 KB
bt8xx.txt -rw-r--r-- 3.8 KB
cards.txt -rw-r--r-- 4.7 KB
ci.txt -rw-r--r-- 6.6 KB
contributors.txt -rw-r--r-- 3.0 KB
faq.txt -rw-r--r-- 5.7 KB
get_dvb_firmware -rwxr-xr-x 25.2 KB
lmedm04.txt -rw-r--r-- 2.0 KB
opera-firmware.txt -rw-r--r-- 482 bytes
readme.txt -rw-r--r-- 1.6 KB
technisat.txt -rw-r--r-- 2.6 KB
ttusb-dec.txt -rw-r--r-- 1.1 KB
udev.txt -rw-r--r-- 2.2 KB

readme.txt

back to top