Revert "ar71xx: prevent spurious ethernet resets from dma hang check false positives"
[openwrt/openwrt.git] / target / linux / generic / patches-4.4 / 046-ubifs-silence-error-output-if-MS_SILENT-is-set.patch
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
7 X-Patchwork-Id: 637491
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>
12
13 This change completes
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.
18
19 Signed-off-by: Daniel Golle <daniel@makrotopia.org>
20 ---
21 fs/ubifs/super.c | 5 +++--
22 1 file changed, 3 insertions(+), 2 deletions(-)
23
24 diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
25 index 7034995..736dd58 100644
26 --- a/fs/ubifs/super.c
27 +++ b/fs/ubifs/super.c
28 @@ -2108,8 +2108,9 @@ static struct dentry *ubifs_mount(struct file_system_type *fs_type, int flags,
29 */
30 ubi = open_ubi(name, UBI_READONLY);
31 if (IS_ERR(ubi)) {
32 - pr_err("UBIFS error (pid: %d): cannot open \"%s\", error %d",
33 - current->pid, name, (int)PTR_ERR(ubi));
34 + if (!(flags & MS_SILENT))
35 + pr_err("UBIFS error (pid: %d): cannot open \"%s\", error %d",
36 + current->pid, name, (int)PTR_ERR(ubi));
37 return ERR_CAST(ubi);
38 }
39
40 --
41 2.8.3
42