aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2016-07-18 18:26:55 -0400
committerRichard Weinberger <richard@nod.at>2016-07-29 17:30:36 -0400
commitdccbc9197d2c3614f2fd6811874e1d982e4415f0 (patch)
tree22ed5b6fcb546b2fc5b3f0aeea6bbeb8887f7d02 /fs/ubifs
parent714fb87e8bc05ff78255afc0dca981e8c5242785 (diff)
ubifs: Silence early error messages if MS_SILENT is set
Probe-mounting a volume too small for UBIFS results in kernel log polution which might irritate users. Address this by silencing errors which may happen during boot if the rootfs is e.g. squashfs (and thus rather small) stored on a UBI volume. Signed-off-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs')
-rw-r--r--fs/ubifs/super.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 736dd5842f46..4ec051089186 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -520,19 +520,19 @@ static int init_constants_early(struct ubifs_info *c)
520 c->max_write_shift = fls(c->max_write_size) - 1; 520 c->max_write_shift = fls(c->max_write_size) - 1;
521 521
522 if (c->leb_size < UBIFS_MIN_LEB_SZ) { 522 if (c->leb_size < UBIFS_MIN_LEB_SZ) {
523 ubifs_err(c, "too small LEBs (%d bytes), min. is %d bytes", 523 ubifs_errc(c, "too small LEBs (%d bytes), min. is %d bytes",
524 c->leb_size, UBIFS_MIN_LEB_SZ); 524 c->leb_size, UBIFS_MIN_LEB_SZ);
525 return -EINVAL; 525 return -EINVAL;
526 } 526 }
527 527
528 if (c->leb_cnt < UBIFS_MIN_LEB_CNT) { 528 if (c->leb_cnt < UBIFS_MIN_LEB_CNT) {
529 ubifs_err(c, "too few LEBs (%d), min. is %d", 529 ubifs_errc(c, "too few LEBs (%d), min. is %d",
530 c->leb_cnt, UBIFS_MIN_LEB_CNT); 530 c->leb_cnt, UBIFS_MIN_LEB_CNT);
531 return -EINVAL; 531 return -EINVAL;
532 } 532 }
533 533
534 if (!is_power_of_2(c->min_io_size)) { 534 if (!is_power_of_2(c->min_io_size)) {
535 ubifs_err(c, "bad min. I/O size %d", c->min_io_size); 535 ubifs_errc(c, "bad min. I/O size %d", c->min_io_size);
536 return -EINVAL; 536 return -EINVAL;
537 } 537 }
538 538
@@ -543,8 +543,8 @@ static int init_constants_early(struct ubifs_info *c)
543 if (c->max_write_size < c->min_io_size || 543 if (c->max_write_size < c->min_io_size ||
544 c->max_write_size % c->min_io_size || 544 c->max_write_size % c->min_io_size ||
545 !is_power_of_2(c->max_write_size)) { 545 !is_power_of_2(c->max_write_size)) {
546 ubifs_err(c, "bad write buffer size %d for %d min. I/O unit", 546 ubifs_errc(c, "bad write buffer size %d for %d min. I/O unit",
547 c->max_write_size, c->min_io_size); 547 c->max_write_size, c->min_io_size);
548 return -EINVAL; 548 return -EINVAL;
549 } 549 }
550 550