From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753874AbdHUODy (ORCPT ); Mon, 21 Aug 2017 10:03:54 -0400 Received: from mx2.suse.de ([195.135.220.15]:46621 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753229AbdHUODw (ORCPT ); Mon, 21 Aug 2017 10:03:52 -0400 Date: Mon, 21 Aug 2017 16:03:49 +0200 From: Jan Kara To: SF Markus Elfring Cc: Jan Kara , kernel-janitors@vger.kernel.org, LKML Subject: Re: [PATCH] quota_v2: Delete an error message for a failed memory allocation in v2_read_file_info() Message-ID: <20170821140349.GA31870@quack2.suse.cz> References: <8916fd8c-2f13-e343-d648-1174563e9c38@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8916fd8c-2f13-e343-d648-1174563e9c38@users.sourceforge.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 16-08-17 16:41:00, SF Markus Elfring wrote: > From: Markus Elfring > Date: Wed, 16 Aug 2017 16:16:30 +0200 > > Omit an extra message for a memory allocation failure in this function. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfring OK, applied the patch to my tree. Thanks. Honza > --- > fs/quota/quota_v2.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/fs/quota/quota_v2.c b/fs/quota/quota_v2.c > index ca71bf881ad1..2259329616b7 100644 > --- a/fs/quota/quota_v2.c > +++ b/fs/quota/quota_v2.c > @@ -109,11 +109,9 @@ static int v2_read_file_info(struct super_block *sb, int type) > return -1; > } > info->dqi_priv = kmalloc(sizeof(struct qtree_mem_dqinfo), GFP_NOFS); > - if (!info->dqi_priv) { > - printk(KERN_WARNING > - "Not enough memory for quota information structure.\n"); > + if (!info->dqi_priv) > return -ENOMEM; > - } > + > qinfo = info->dqi_priv; > if (version == 0) { > /* limits are stored as unsigned 32-bit data */ > -- > 2.14.0 > > -- Jan Kara SUSE Labs, CR