Fixed x86 GRUB config label
[librecmc/librecmc.git] / target / linux / generic / patches-4.1 / 047-ubifs-silence-early-error-if-MS_SILENT-is-set.patch
1 From dccbc9197d2c3614f2fd6811874e1d982e4415f0 Mon Sep 17 00:00:00 2001
2 From: Daniel Golle <daniel@makrotopia.org>
3 Date: Tue, 19 Jul 2016 00:26:55 +0200
4 Subject: [PATCH] ubifs: Silence early error messages if MS_SILENT is set
5
6 Probe-mounting a volume too small for UBIFS results in kernel log
7 polution which might irritate users.
8 Address this by silencing errors which may happen during boot if the
9 rootfs is e.g. squashfs (and thus rather small) stored on a UBI volume.
10
11 Signed-off-by: Daniel Golle <daniel@makrotopia.org>
12 Signed-off-by: Richard Weinberger <richard@nod.at>
13 ---
14  fs/ubifs/super.c | 14 +++++++-------
15  1 file changed, 7 insertions(+), 7 deletions(-)
16
17 --- a/fs/ubifs/super.c
18 +++ b/fs/ubifs/super.c
19 @@ -516,19 +516,19 @@ static int init_constants_early(struct u
20         c->max_write_shift = fls(c->max_write_size) - 1;
21  
22         if (c->leb_size < UBIFS_MIN_LEB_SZ) {
23 -               ubifs_err(c, "too small LEBs (%d bytes), min. is %d bytes",
24 -                         c->leb_size, UBIFS_MIN_LEB_SZ);
25 +               ubifs_errc(c, "too small LEBs (%d bytes), min. is %d bytes",
26 +                          c->leb_size, UBIFS_MIN_LEB_SZ);
27                 return -EINVAL;
28         }
29  
30         if (c->leb_cnt < UBIFS_MIN_LEB_CNT) {
31 -               ubifs_err(c, "too few LEBs (%d), min. is %d",
32 -                         c->leb_cnt, UBIFS_MIN_LEB_CNT);
33 +               ubifs_errc(c, "too few LEBs (%d), min. is %d",
34 +                          c->leb_cnt, UBIFS_MIN_LEB_CNT);
35                 return -EINVAL;
36         }
37  
38         if (!is_power_of_2(c->min_io_size)) {
39 -               ubifs_err(c, "bad min. I/O size %d", c->min_io_size);
40 +               ubifs_errc(c, "bad min. I/O size %d", c->min_io_size);
41                 return -EINVAL;
42         }
43  
44 @@ -539,8 +539,8 @@ static int init_constants_early(struct u
45         if (c->max_write_size < c->min_io_size ||
46             c->max_write_size % c->min_io_size ||
47             !is_power_of_2(c->max_write_size)) {
48 -               ubifs_err(c, "bad write buffer size %d for %d min. I/O unit",
49 -                         c->max_write_size, c->min_io_size);
50 +               ubifs_errc(c, "bad write buffer size %d for %d min. I/O unit",
51 +                          c->max_write_size, c->min_io_size);
52                 return -EINVAL;
53         }
54