From: Wang Sheng-Hui <shhuiw@gmail.com>
To: yinghai@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] mm/memblock.c: return -ENOMEM instead of -ENXIO on failure of debugfs_create_dir in memblock_init_debugfs
Date: Wed, 09 Nov 2011 10:01:26 +0800 [thread overview]
Message-ID: <4EB9DEF6.4080905@gmail.com> (raw)
On the failure of debugfs_create_dir, we should return -ENOMEM
instead of -ENXIO.
The patch is against 3.1.
Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
---
mm/memblock.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mm/memblock.c b/mm/memblock.c
index ccbf973..4d4d5ee 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -852,7 +852,7 @@ static int __init memblock_init_debugfs(void)
{
struct dentry *root = debugfs_create_dir("memblock", NULL);
if (!root)
- return -ENXIO;
+ return -ENOMEM;
debugfs_create_file("memory", S_IRUGO, root, &memblock.memory, &memblock_debug_fops);
debugfs_create_file("reserved", S_IRUGO, root, &memblock.reserved, &memblock_debug_fops);
--
1.7.1
WARNING: multiple messages have this Message-ID (diff)
From: Wang Sheng-Hui <shhuiw@gmail.com>
To: yinghai@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] mm/memblock.c: return -ENOMEM instead of -ENXIO on failure of debugfs_create_dir in memblock_init_debugfs
Date: Wed, 09 Nov 2011 10:01:26 +0800 [thread overview]
Message-ID: <4EB9DEF6.4080905@gmail.com> (raw)
On the failure of debugfs_create_dir, we should return -ENOMEM
instead of -ENXIO.
The patch is against 3.1.
Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
---
mm/memblock.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mm/memblock.c b/mm/memblock.c
index ccbf973..4d4d5ee 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -852,7 +852,7 @@ static int __init memblock_init_debugfs(void)
{
struct dentry *root = debugfs_create_dir("memblock", NULL);
if (!root)
- return -ENXIO;
+ return -ENOMEM;
debugfs_create_file("memory", S_IRUGO, root, &memblock.memory, &memblock_debug_fops);
debugfs_create_file("reserved", S_IRUGO, root, &memblock.reserved, &memblock_debug_fops);
--
1.7.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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2011-11-09 2:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-09 2:01 Wang Sheng-Hui [this message]
2011-11-09 2:01 ` [PATCH 1/2] mm/memblock.c: return -ENOMEM instead of -ENXIO on failure of debugfs_create_dir in memblock_init_debugfs Wang Sheng-Hui
2011-11-22 23:55 ` Andrew Morton
2011-11-22 23:55 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EB9DEF6.4080905@gmail.com \
--to=shhuiw@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.