kernel: bump kernel 4.4 to 4.4.129 for 17.01
[openwrt/openwrt.git] / target / linux / generic / patches-4.4 / 046-ubifs-silence-error-output-if-MS_SILENT-is-set.patch
1 From 1ae92642e5900316011736072b4fa91710840620 Mon Sep 17 00:00:00 2001
2 From: Daniel Golle <daniel@makrotopia.org>
3 Date: Sat, 18 Jun 2016 17:53:45 +0200
4 Subject: [PATCH] ubifs: Silence error output if MS_SILENT is set
5
6 This change completes commit
7 90bea5a3f0 ("UBIFS: respect MS_SILENT mount flag")
8 which already implements support for MS_SILENT except for that one
9 error message which is still being displayed despite MS_SILENT being
10 set. Suppress that error message as well in case MS_SILENT is set.
11
12 Signed-off-by: Daniel Golle <daniel@makrotopia.org>
13 [rw: massaged commit message]
14 Signed-off-by: Richard Weinberger <richard@nod.at>
15 ---
16 fs/ubifs/super.c | 5 +++--
17 1 file changed, 3 insertions(+), 2 deletions(-)
18
19 --- a/fs/ubifs/super.c
20 +++ b/fs/ubifs/super.c
21 @@ -2113,8 +2113,9 @@ static struct dentry *ubifs_mount(struct
22 */
23 ubi = open_ubi(name, UBI_READONLY);
24 if (IS_ERR(ubi)) {
25 - pr_err("UBIFS error (pid: %d): cannot open \"%s\", error %d",
26 - current->pid, name, (int)PTR_ERR(ubi));
27 + if (!(flags & MS_SILENT))
28 + pr_err("UBIFS error (pid: %d): cannot open \"%s\", error %d",
29 + current->pid, name, (int)PTR_ERR(ubi));
30 return ERR_CAST(ubi);
31 }
32