Re: [PATCH 15/15][e2fsprogs] 64-bit mke2fs cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Jose R. Santos" <jrs@xxxxxxxxxx> writes:

> diff --git a/lib/ext2fs/initialize.c b/lib/ext2fs/initialize.c
> index e9bfe49..5060fda 100644
> --- a/lib/ext2fs/initialize.c
> +++ b/lib/ext2fs/initialize.c
> @@ -200,9 +200,9 @@ errcode_t ext2fs_initialize(const char *name, int flags,
>  		super->s_blocks_per_group = EXT2_MAX_BLOCKS_PER_GROUP(super);
>  	super->s_frags_per_group = super->s_blocks_per_group * frags_per_block;
>  	
> -	super->s_blocks_count = param->s_blocks_count;
> -	super->s_r_blocks_count = param->s_r_blocks_count;
> -	if (super->s_r_blocks_count >= param->s_blocks_count) {
> +	ext2fs_blocks_count_set(super, param->s_blocks_count);
> +	ext2fs_r_blocks_count_set(super, param->s_r_blocks_count);
> +	if (ext2fs_r_blocks_count(super) >= ext2fs_blocks_count(param)) {
>  		retval = EXT2_ET_INVALID_ARGUMENT;
>  		goto cleanup;
>  	}

This needs to preserve the high bits from param:

+	ext2fs_blocks_count_set(super, ext2fs_blocks_count(param));
+	ext2fs_r_blocks_count_set(super, ext2fs_r_blocks_count(param->s_r_blocks_count));

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

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux