linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/hugetlb: use EOPNOTSUPP in hugetlb sysctl handlers
@ 2016-03-03 10:02 Jan Stancek
  2016-03-03 10:54 ` Kirill A. Shutemov
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Jan Stancek @ 2016-03-03 10:02 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-kernel, akpm, n-horiguchi, mike.kravetz, hillf.zj,
	kirill.shutemov, dave.hansen, paul.gortmaker, jstancek

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

--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-03-08  3:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-03 10:02 [PATCH] mm/hugetlb: use EOPNOTSUPP in hugetlb sysctl handlers Jan Stancek
2016-03-03 10:54 ` Kirill A. Shutemov
2016-03-03 23:05 ` Naoya Horiguchi
2016-03-04 21:38 ` Andrew Morton
2016-03-05  8:09   ` Jan Stancek
2016-03-08  0:03     ` Andrew Morton
2016-03-07 22:18 ` David Rientjes
2016-03-08  3:00   ` Hillf Danton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).