Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1407282

Re: [PATCH 2/2] fs: befs: Check silent flag before logging errors

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] fs: befs: Check silent flag before logging errors
Date 2016-05-26 01:10 +0200
Message-ID <rCQ65-6Yp-1@gated-at.bofh.it> (permalink)
References <rCP0l-66M-11@gated-at.bofh.it> <rCP0l-66M-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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?

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] fs: befs: Move useless assignment Salah Triki <salah.triki@acm.org> - 2016-05-26 00:00 +0200
  [PATCH 2/2] fs: befs: Check silent flag before logging errors Salah Triki <salah.triki@acm.org> - 2016-05-26 00:00 +0200
    Re: [PATCH 2/2] fs: befs: Check silent flag before logging errors Joe Perches <joe@perches.com> - 2016-05-26 01:10 +0200

csiph-web