Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Daniel Golle and committed by
Richard Weinberger
dccbc919 714fb87e

+7 -7
+7 -7
fs/ubifs/super.c
··· 520 520 c->max_write_shift = fls(c->max_write_size) - 1; 521 521 522 522 if (c->leb_size < UBIFS_MIN_LEB_SZ) { 523 - ubifs_err(c, "too small LEBs (%d bytes), min. is %d bytes", 524 - c->leb_size, UBIFS_MIN_LEB_SZ); 523 + ubifs_errc(c, "too small LEBs (%d bytes), min. is %d bytes", 524 + c->leb_size, UBIFS_MIN_LEB_SZ); 525 525 return -EINVAL; 526 526 } 527 527 528 528 if (c->leb_cnt < UBIFS_MIN_LEB_CNT) { 529 - ubifs_err(c, "too few LEBs (%d), min. is %d", 530 - c->leb_cnt, UBIFS_MIN_LEB_CNT); 529 + ubifs_errc(c, "too few LEBs (%d), min. is %d", 530 + c->leb_cnt, UBIFS_MIN_LEB_CNT); 531 531 return -EINVAL; 532 532 } 533 533 534 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 536 return -EINVAL; 537 537 } 538 538 ··· 543 543 if (c->max_write_size < c->min_io_size || 544 544 c->max_write_size % c->min_io_size || 545 545 !is_power_of_2(c->max_write_size)) { 546 - ubifs_err(c, "bad write buffer size %d for %d min. I/O unit", 547 - c->max_write_size, c->min_io_size); 546 + ubifs_errc(c, "bad write buffer size %d for %d min. I/O unit", 547 + c->max_write_size, c->min_io_size); 548 548 return -EINVAL; 549 549 } 550 550