From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752424AbcEYXAq (ORCPT ); Wed, 25 May 2016 19:00:46 -0400 Received: from smtprelay0027.hostedemail.com ([216.40.44.27]:59803 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751386AbcEYXAp (ORCPT ); Wed, 25 May 2016 19:00:45 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::,RULES_HIT:41:355:379:541:599:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:1981:2194:2198:2199:2200:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3871:4250:4321:5007:10004:10400:10848:11026:11232:11658:11783:11914:12296:12517:12519:12740:13069:13161:13229:13311:13357:13439:13894:14659:14721:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: night42_235adf0529c55 X-Filterd-Recvd-Size: 2049 Message-ID: <1464217241.16344.24.camel@perches.com> Subject: Re: [PATCH 2/2] fs: befs: Check silent flag before logging errors From: Joe Perches To: Salah Triki , akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org Date: Wed, 25 May 2016 16:00:41 -0700 In-Reply-To: <012f7177681b277d4ef9cd7a5ba7d15ebe993264.1464213373.git.salah.triki@acm.org> References: <012f7177681b277d4ef9cd7a5ba7d15ebe993264.1464213373.git.salah.triki@acm.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.2-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2016-05-25 at 22:58 +0100, Salah Triki wrote: > Log errors only when silent flag is not set. [] > diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c [] > @@ -765,14 +765,16 @@ befs_fill_super(struct super_block *sb, void *data, int silent) >   >   sb->s_fs_info = kzalloc(sizeof(*befs_sb), GFP_KERNEL); >   if (sb->s_fs_info == NULL) { > - pr_err("(%s): Unable to allocate memory for private " > -        "portion of superblock. Bailing.\n", sb->s_id); > + if (!silent) > + pr_err("(%s): Unable to allocate memory for private " > + "portion of superblock. Bailing.\n", sb->s_id); Might as well remove this pr_err instead as there's already a generic OOM and stack dump. > @@ -820,9 +823,10 @@ befs_fill_super(struct super_block *sb, void *data, int silent) >   brelse(bh); >   >   if( befs_sb->num_blocks > ~((sector_t)0) ) { > - befs_error(sb, "blocks count: %llu " > - "is larger than the host can use", > - befs_sb->num_blocks); > + if (!silent) > + befs_error(sb, "blocks count: %llu " > + "is larger than the host can use", > + befs_sb->num_blocks); Coalesce format too?