
From: <achurch@achurch.org> (Andrew Church)

The following patch fixes a bug in the processing of the sb= (alternate
superblock) mount option for ext3: when changing the device block size, the
given superblock is ignored and the code reverts to using block 1.


---

 25-akpm/fs/ext3/super.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -puN fs/ext3/super.c~ext3-alternate-sb-mount-fix fs/ext3/super.c
--- 25/fs/ext3/super.c~ext3-alternate-sb-mount-fix	2004-04-09 21:05:00.979882544 -0700
+++ 25-akpm/fs/ext3/super.c	2004-04-09 21:05:00.989881024 -0700
@@ -1039,8 +1039,9 @@ static int ext3_fill_super (struct super
 	struct buffer_head * bh;
 	struct ext3_super_block *es = 0;
 	struct ext3_sb_info *sbi;
+	unsigned long block;
 	unsigned long sb_block = get_sb_block(&data);
-	unsigned long block, logic_sb_block = 1;
+	unsigned long logic_sb_block;
 	unsigned long offset = 0;
 	unsigned long journal_inum = 0;
 	unsigned long def_mount_opts;
@@ -1073,6 +1074,8 @@ static int ext3_fill_super (struct super
 	if (blocksize != EXT3_MIN_BLOCK_SIZE) {
 		logic_sb_block = (sb_block * EXT3_MIN_BLOCK_SIZE) / blocksize;
 		offset = (sb_block * EXT3_MIN_BLOCK_SIZE) % blocksize;
+	} else {
+		logic_sb_block = sb_block;
 	}
 
 	if (!(bh = sb_bread(sb, logic_sb_block))) {

_
