From: Salah Triki <salah.triki@acm.org>
To: akpm@linux-foundation.org, joe@perches.com
Cc: Salah Triki <salah.triki@acm.org>, linux-kernel@vger.kernel.org
Subject: [PATCH V3 2/4] fs: befs: Check silent flag before logging errors
Date: Thu, 26 May 2016 01:13:42 +0100 [thread overview]
Message-ID: <d400aaf5a7430de79bd956e40ec075fb1cb08474.1464221265.git.salah.triki@acm.org> (raw)
In-Reply-To: <ed41da113fc693c7daa4e8813ca04cc766ddfc05.1464221265.git.salah.triki@acm.org>
In-Reply-To: <ed41da113fc693c7daa4e8813ca04cc766ddfc05.1464221265.git.salah.triki@acm.org>
Log errors only when silent flag is not set.
Signed-off-by: Salah Triki <salah.triki@acm.org>
---
fs/befs/linuxvfs.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index 75ec9a7..edee857 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -772,7 +772,8 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
befs_sb = BEFS_SB(sb);
if (!parse_options((char *) data, &befs_sb->mount_opts)) {
- befs_error(sb, "cannot parse mount options");
+ if (!silent)
+ befs_error(sb, "cannot parse mount options");
goto unacquire_priv_sbp;
}
@@ -796,7 +797,8 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
sb_min_blocksize(sb, 1024);
if (!(bh = sb_bread(sb, sb_block))) {
- befs_error(sb, "unable to read superblock");
+ if (!silent)
+ befs_error(sb, "unable to read superblock");
goto unacquire_priv_sbp;
}
@@ -820,9 +822,9 @@ 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);
goto unacquire_priv_sbp;
}
@@ -841,7 +843,8 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
}
sb->s_root = d_make_root(root);
if (!sb->s_root) {
- befs_error(sb, "get root inode failed");
+ if (!silent)
+ befs_error(sb, "get root inode failed");
goto unacquire_priv_sbp;
}
--
1.9.1
next prev parent reply other threads:[~2016-05-26 1:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-26 0:13 [PATCH V3 1/4] fs: befs: Move useless assignment Salah Triki
2016-05-26 0:13 ` Salah Triki [this message]
2016-05-26 0:13 ` [PATCH V3 3/4] fs: befs: Remove useless pr_err Salah Triki
2016-05-26 0:13 ` [PATCH V3 4/4] fs: befs: Remove useless befs_error Salah Triki
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=d400aaf5a7430de79bd956e40ec075fb1cb08474.1464221265.git.salah.triki@acm.org \
--to=salah.triki@acm.org \
--cc=akpm@linux-foundation.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®