summaryrefslogtreecommitdiffstats
path: root/fs/ext3/super.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2012-05-24 19:00:37 +0200
committerJan Kara <jack@suse.cz>2012-07-09 12:03:11 +0200
commitf007dbf8e51f4a0910194eebc2aa119eb861893e (patch)
tree568ef2396a9396ac7adf69d18811f40a43302b0d /fs/ext3/super.c
parentquota: fix checkpatch.pl warning by replacing <asm/uaccess.h> with <linux/uac... (diff)
downloadlinux-f007dbf8e51f4a0910194eebc2aa119eb861893e.tar.xz
linux-f007dbf8e51f4a0910194eebc2aa119eb861893e.zip
ext3: force ro mount if ext3_setup_super() fails
If ext3_setup_super() fails i.e. due to a too-high revision, the error is logged in dmesg but the fs is not mounted RO as indicated. Tested by: [164152.114551] EXT3-fs (sdb6): error: revision level too high, forcing read-only mode /dev/sdb6 /mnt/test2 ext3 rw,seclabel,relatime,errors=continue,user_xattr,acl,barrier=1,data=ordered 0 0 ^^ Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext3/super.c')
-rw-r--r--fs/ext3/super.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index 8c3a44b7c375..b4e19926f46f 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -2058,7 +2058,8 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
goto failed_mount3;
}
- ext3_setup_super (sb, es, sb->s_flags & MS_RDONLY);
+ if (ext3_setup_super(sb, es, sb->s_flags & MS_RDONLY))
+ sb->s_flags |= MS_RDONLY;
EXT3_SB(sb)->s_mount_state |= EXT3_ORPHAN_FS;
ext3_orphan_cleanup(sb, es);