Skip to content

Commit dceee2e

Browse files
salah-trikiluisbg
authored andcommitted
fs/befs/linuxvfs.c: check silent flag before logging errors
Log errors only when silent flag is not set. Link: http://lkml.kernel.org/r/d400aaf5a7430de79bd956e40ec075fb1cb08474.1464226521.git.salah.triki@acm.org Signed-off-by: Salah Triki <salah.triki@acm.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 3098258 commit dceee2e

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

‎fs/befs/linuxvfs.c‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,8 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
772772
befs_sb = BEFS_SB(sb);
773773

774774
if (!parse_options((char *) data, &befs_sb->mount_opts)) {
775-
befs_error(sb, "cannot parse mount options");
775+
if (!silent)
776+
befs_error(sb, "cannot parse mount options");
776777
goto unacquire_priv_sbp;
777778
}
778779

@@ -796,7 +797,8 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
796797
sb_min_blocksize(sb, 1024);
797798

798799
if (!(bh = sb_bread(sb, sb_block))) {
799-
befs_error(sb, "unable to read superblock");
800+
if (!silent)
801+
befs_error(sb, "unable to read superblock");
800802
goto unacquire_priv_sbp;
801803
}
802804

@@ -820,9 +822,9 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
820822
brelse(bh);
821823

822824
if( befs_sb->num_blocks > ~((sector_t)0) ) {
823-
befs_error(sb, "blocks count: %llu "
824-
"is larger than the host can use",
825-
befs_sb->num_blocks);
825+
if (!silent)
826+
befs_error(sb, "blocks count: %llu is larger than the host can use",
827+
befs_sb->num_blocks);
826828
goto unacquire_priv_sbp;
827829
}
828830

@@ -841,7 +843,8 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
841843
}
842844
sb->s_root = d_make_root(root);
843845
if (!sb->s_root) {
844-
befs_error(sb, "get root inode failed");
846+
if (!silent)
847+
befs_error(sb, "get root inode failed");
845848
goto unacquire_priv_sbp;
846849
}
847850

0 commit comments

Comments
 (0)