Skip to content

Commit

Permalink
ubifs: Silence error output if MS_SILENT is set
Browse files Browse the repository at this point in the history
This change completes commit
90bea5a ("UBIFS: respect MS_SILENT mount flag")
which already implements support for MS_SILENT except for that one
error message which is still being displayed despite MS_SILENT being
set. Suppress that error message as well in case MS_SILENT is set.

Signed-off-by: Daniel Golle <[email protected]>
[rw: massaged commit message]
Signed-off-by: Richard Weinberger <[email protected]>
  • Loading branch information
dangowrt authored and richardweinberger committed Jul 29, 2016
1 parent 523d939 commit 1ae9264
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/ubifs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -2108,8 +2108,9 @@ static struct dentry *ubifs_mount(struct file_system_type *fs_type, int flags,
*/
ubi = open_ubi(name, UBI_READONLY);
if (IS_ERR(ubi)) {
pr_err("UBIFS error (pid: %d): cannot open \"%s\", error %d",
current->pid, name, (int)PTR_ERR(ubi));
if (!(flags & MS_SILENT))
pr_err("UBIFS error (pid: %d): cannot open \"%s\", error %d",
current->pid, name, (int)PTR_ERR(ubi));
return ERR_CAST(ubi);
}

Expand Down

0 comments on commit 1ae9264

Please sign in to comment.