1 From 6da56ec248e48c9c78721f51528c178adec3b35b Mon Sep 17 00:00:00 2001
2 In-Reply-To: <5765615E.5010409@nod.at>
3 References: <5765615E.5010409@nod.at>
4 From: Daniel Golle <daniel@makrotopia.org>
5 Date: Sat, 18 Jun 2016 11:42:52 +0200
6 Subject: [PATCH] ubifs: silence error output if MS_SILENT is set
8 X-Patchwork-Delegate: richard.weinberger@gmail.com
9 To: linux-mtd@lists.infradead.org
10 Cc: Artem Bityutskiy <dedekind1@gmail.com>,
11 Richard Weinberger <richard.weinberger@gmail.com>
14 commit 90bea5a3f0bf680b87b90516f3c231997f4b8f3b
15 which already implements support for MS_SILENT except for that one
16 error message which is still being displayed despite MS_SILENT being
17 set. Suppress that error message as well in case MS_SILENT is set.
19 Signed-off-by: Daniel Golle <daniel@makrotopia.org>
21 fs/ubifs/super.c | 5 +++--
22 1 file changed, 3 insertions(+), 2 deletions(-)
24 --- a/fs/ubifs/super.c
25 +++ b/fs/ubifs/super.c
26 @@ -2107,8 +2107,9 @@ static struct dentry *ubifs_mount(struct
28 ubi = open_ubi(name, UBI_READONLY);
30 - pr_err("UBIFS error (pid: %d): cannot open \"%s\", error %d",
31 - current->pid, name, (int)PTR_ERR(ubi));
32 + if (!(flags & MS_SILENT))
33 + pr_err("UBIFS error (pid: %d): cannot open \"%s\", error %d",
34 + current->pid, name, (int)PTR_ERR(ubi));