From: Daniel Golle Date: Sat, 18 Jun 2016 15:53:45 +0000 (+0200) Subject: ubifs: Silence error output if MS_SILENT is set X-Git-Tag: v4.8-rc1~39^2~16 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=1ae92642e5900316011736072b4fa91710840620;p=linux.git ubifs: Silence error output if MS_SILENT is set This change completes commit 90bea5a3f0 ("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 [rw: massaged commit message] Signed-off-by: Richard Weinberger --- diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 70349954e78b..736dd5842f46 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -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); }