[PATCH] EXT3 fs divide by 0 in ext3_fill_super (2.5.44)

Angus Sawyer (angus.sawyer@dsl.pipex.com)
Mon, 28 Oct 2002 13:17:16 +0000


problem:

attempting to mount an ext3 fs on a stopped md/raid1 array caused a divide by
0 error in ext3_fill_super.

Fix duplicates check already in ext2.

patch:

--- linux-2.5.44/fs/ext3/super.c Wed Oct 23 16:19:08 2002
+++ linux/fs/ext3/super.c Mon Oct 28 11:29:33 2002
@@ -986,6 +986,10 @@
goto out_fail;

blocksize = sb_min_blocksize(sb, EXT3_MIN_BLOCK_SIZE);
+ if (!blocksize) {
+ printk(KERN_ERR "EXT3-fs: unable to set blocksize\n");
+ goto out_fail;
+ }

/*
* The ext3 superblock will not be buffer aligned for other than 1kB

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/