Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751707AbdHSRIc (ORCPT ); Sat, 19 Aug 2017 13:08:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46854 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751368AbdHSRIb (ORCPT ); Sat, 19 Aug 2017 13:08:31 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1F80F80472 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=esandeen@redhat.com Reply-To: sandeen@redhat.com Subject: Re: [PATCH 1/2] ext4: Delete an error message for a failed memory allocation in ext4_multi_mount_protect() To: SF Markus Elfring , linux-ext4@vger.kernel.org, Andreas Dilger , "Theodore Ts'o" Cc: LKML , kernel-janitors@vger.kernel.org References: <5bf432ae-398d-718c-8105-3092a240a8ef@users.sourceforge.net> From: Eric Sandeen Message-ID: Date: Sat, 19 Aug 2017 12:08:29 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <5bf432ae-398d-718c-8105-3092a240a8ef@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Sat, 19 Aug 2017 17:08:31 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1012 Lines: 35 On 8/19/17 6:47 AM, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sat, 19 Aug 2017 13:04:50 +0200 > > Omit an extra message for a memory allocation failure in this function. I might be dense, but what makes this message "extra?" (I suppose kmalloc squawks too if it fails, but is Coccinelle now warning about explicit memory allocation failure warnings?) -Eric > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfring > --- > fs/ext4/mmp.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/fs/ext4/mmp.c b/fs/ext4/mmp.c > index eb9835638680..1ce00453f612 100644 > --- a/fs/ext4/mmp.c > +++ b/fs/ext4/mmp.c > @@ -371,7 +371,6 @@ int ext4_multi_mount_protect(struct super_block *sb, > - if (!mmpd_data) { > - ext4_warning(sb, "not enough memory for mmpd_data"); > + if (!mmpd_data) > goto failed; > - } > + > mmpd_data->sb = sb; > mmpd_data->bh = bh; > >