summaryrefslogtreecommitdiffstats
path: root/fs/ubifs/super.c
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2014-06-02 15:51:10 +0200
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2014-06-02 17:00:52 +0200
commit90bea5a3f0bf680b87b90516f3c231997f4b8f3b (patch)
treeaf096de2a3a5b5f4d61a5bae06331fed9854534b /fs/ubifs/super.c
parentUBIFS: Remove incorrect assertion in shrink_tnc() (diff)
downloadlinux-90bea5a3f0bf680b87b90516f3c231997f4b8f3b.tar.xz
linux-90bea5a3f0bf680b87b90516f3c231997f4b8f3b.zip
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>
Diffstat (limited to 'fs/ubifs/super.c')
-rw-r--r--fs/ubifs/super.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index a81c7b556896..3904c8574ef9 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -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.