From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754187AbbCBN4Q (ORCPT ); Mon, 2 Mar 2015 08:56:16 -0500 Received: from cantor2.suse.de ([195.135.220.15]:60567 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753680AbbCBNzh (ORCPT ); Mon, 2 Mar 2015 08:55:37 -0500 From: Michal Hocko To: Cc: Andrew Morton , Johannes Weiner , David Rientjes , Dave Chinner , "Theodore Ts'o" , Mel Gorman , Tetsuo Handa , "David S. Miller" , sparclinux@vger.kernel.org, Vipul Pandya , netdev@vger.kernel.org, LKML Subject: [RFC 3/4] sparc: remove __GFP_NOFAIL reuquirement Date: Mon, 2 Mar 2015 14:54:42 +0100 Message-Id: <1425304483-7987-4-git-send-email-mhocko@suse.cz> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1425304483-7987-1-git-send-email-mhocko@suse.cz> References: <1425304483-7987-1-git-send-email-mhocko@suse.cz> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org mdesc_kmalloc is currently requiring __GFP_NOFAIL allocation although it seems that the allocation failure is handled by all callers (via mdesc_alloc). __GFP_NOFAIL is a strong liability for the memory allocator and so the users are discouraged to use the flag unless the allocation failure is really a nogo. Drop the flag here as this doesn't seem to be the case. Signed-off-by: Michal Hocko --- 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 99632a87e697..6801bd778af2 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); if (base) { struct mdesc_handle *hp; unsigned long addr; -- 2.1.4