lkml.org 
[lkml]   [2014]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] sparc: replace __GFP_NOFAIL with GFP_ATOMIC in mdesc_kmalloc()
Date
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)


\
 
 \ /
  Last update: 2014-01-07 11:01    [W:0.049 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site