public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Salah Triki <salah.triki@acm.org>, akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] fs: befs: Check silent flag before logging errors
Date: Wed, 25 May 2016 16:00:41 -0700	[thread overview]
Message-ID: <1464217241.16344.24.camel@perches.com> (raw)
In-Reply-To: <012f7177681b277d4ef9cd7a5ba7d15ebe993264.1464213373.git.salah.triki@acm.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?

      reply	other threads:[~2016-05-25 23:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-25 21:58 [PATCH 1/2] fs: befs: Move useless assignment Salah Triki
2016-05-25 21:58 ` [PATCH 2/2] fs: befs: Check silent flag before logging errors Salah Triki
2016-05-25 23:00   ` Joe Perches [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1464217241.16344.24.camel@perches.com \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=salah.triki@acm.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox