Skip to content

Commit

Permalink
ext3: force ro mount if ext3_setup_super() fails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Sandeen authored and Jan Kara committed Jul 9, 2012
1 parent f3da931 commit f007dbf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/ext3/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f007dbf

Please sign in to comment.