Commit 01f5c53c authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Linus Torvalds

[PATCH] simple EXT2 patch

Do not crash on null pointer dereference, if cannot reread superblock.
parent 54fa2f39
...@@ -673,7 +673,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) ...@@ -673,7 +673,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
if(!bh) { if(!bh) {
printk("EXT2-fs: Couldn't read superblock on " printk("EXT2-fs: Couldn't read superblock on "
"2nd try.\n"); "2nd try.\n");
goto failed_mount; goto failed_sbi;
} }
es = (struct ext2_super_block *) (((char *)bh->b_data) + offset); es = (struct ext2_super_block *) (((char *)bh->b_data) + offset);
sbi->s_es = es; sbi->s_es = es;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment