UBIFS: respect MS_SILENT mount flag
When attempting to mount a non-ubifs formatted volume, lots of error messages (including a stack dump) are thrown to the kernel log even if the MS_SILENT mount flag is set. Fix this by introducing adding an additional state-variable in struct ubifs_info and suppress error messages in ubifs_read_node if MS_SILENT is set. Signed-off-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Šī revīzija ir iekļauta:

revīziju iesūtīja
Artem Bityutskiy

vecāks
72abc8f4b4
revīzija
90bea5a3f0
@@ -1149,6 +1149,9 @@ static int mount_ubifs(struct ubifs_info *c)
|
||||
size_t sz;
|
||||
|
||||
c->ro_mount = !!(c->vfs_sb->s_flags & MS_RDONLY);
|
||||
/* Suppress error messages while probing if MS_SILENT is set */
|
||||
c->probing = !!(c->vfs_sb->s_flags & MS_SILENT);
|
||||
|
||||
err = init_constants_early(c);
|
||||
if (err)
|
||||
return err;
|
||||
@@ -1214,6 +1217,8 @@ static int mount_ubifs(struct ubifs_info *c)
|
||||
if (err)
|
||||
goto out_free;
|
||||
|
||||
c->probing = 0;
|
||||
|
||||
/*
|
||||
* Make sure the compressor which is set as default in the superblock
|
||||
* or overridden by mount options is actually compiled in.
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user