From: Ethan Zhao <ethan.kernel@gmail.com>
To: davem@davemloft.net
Cc: linux-kernel@vger.kernel.org, Ethan Zhao <ethan.kernel@gmail.com>
Subject: [PATCH] sparc: replace __GFP_NOFAIL with GFP_ATOMIC in mdesc_kmalloc()
Date: Wed, 11 Dec 2013 22:54:21 +0800 [thread overview]
Message-ID: <1386773661-921-1-git-send-email-ethan.kernel@gmail.com> (raw)
Has kmalloc() failure checking there, so it is unnecessary to allocate with
__GFP_NOFAIL flag that might block forever.
Signed-off-by: Ethan Zhao <ethan.kernel@gmail.com>
---
arch/sparc/kernel/mdesc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sparc/kernel/mdesc.c b/arch/sparc/kernel/mdesc.c
index b90bf23..e8d678c 100644
--- a/arch/sparc/kernel/mdesc.c
+++ b/arch/sparc/kernel/mdesc.c
@@ -136,7 +136,7 @@ static struct mdesc_handle *mdesc_kmalloc(unsigned int mdesc_size)
sizeof(struct mdesc_hdr) +
mdesc_size);
- base = kmalloc(handle_size + 15, GFP_KERNEL | __GFP_NOFAIL);
+ base = kmalloc(handle_size + 15, GFP_KERNEL | GFP_ATOMIC);
if (base) {
struct mdesc_handle *hp;
unsigned long addr;
--
1.8.3.4 (Apple Git-47)
next reply other threads:[~2013-12-11 14:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-11 14:54 Ethan Zhao [this message]
2014-01-05 2:05 ` [PATCH] sparc: replace __GFP_NOFAIL with GFP_ATOMIC in mdesc_kmalloc() David Miller
2014-01-07 1:48 ` Ethan Zhao
2014-01-07 2:21 ` Ethan Zhao
2014-01-07 2:29 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2014-01-07 9:31 Ethan Zhao
2014-01-07 19:11 ` David Miller
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=1386773661-921-1-git-send-email-ethan.kernel@gmail.com \
--to=ethan.kernel@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox