diff mbox

e2fsprogs: Fix thinko in ext2fs_initialize bigalloc case

Message ID 4E8A30AE.10805@redhat.com
State Accepted, archived
Headers show

Commit Message

Eric Sandeen Oct. 3, 2011, 10:01 p.m. UTC
Surely we should be setting s_clusters_per_group, not
s_blocks_per_group, to EXT2_MAX_CLUSTERS_PER_GROUP here.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---


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

Comments

Theodore Ts'o Oct. 4, 2011, 3:24 a.m. UTC | #1
On Mon, Oct 03, 2011 at 05:01:18PM -0500, Eric Sandeen wrote:
> Surely we should be setting s_clusters_per_group, not
> s_blocks_per_group, to EXT2_MAX_CLUSTERS_PER_GROUP here.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Yes, oops.  Good catch, applied.

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/lib/ext2fs/initialize.c b/lib/ext2fs/initialize.c
index 47f0b1c..2875f97 100644
--- a/lib/ext2fs/initialize.c
+++ b/lib/ext2fs/initialize.c
@@ -218,7 +218,7 @@  errcode_t ext2fs_initialize(const char *name, int flags,
 		else
 			super->s_clusters_per_group = fs->blocksize * 8;
 		if (super->s_clusters_per_group > EXT2_MAX_CLUSTERS_PER_GROUP(super))
-			super->s_blocks_per_group = EXT2_MAX_CLUSTERS_PER_GROUP(super);
+			super->s_clusters_per_group = EXT2_MAX_CLUSTERS_PER_GROUP(super);
 		super->s_blocks_per_group = EXT2FS_C2B(fs,
 				       super->s_clusters_per_group);
 	} else {