From patchwork Mon Mar 2 13:54:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Hocko X-Patchwork-Id: 445292 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id BA68E140172 for ; Tue, 3 Mar 2015 00:56:38 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754142AbbCBN4P (ORCPT ); Mon, 2 Mar 2015 08:56:15 -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 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id DE481AC7B; Mon, 2 Mar 2015 13:55:35 +0000 (UTC) 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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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;