Re: [PATCH]: ext4: fix big endian

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

 



On Thu, Nov 06, 2008 at 11:06:25AM -0500, Peter Staubach wrote:
>> Index: kvm/fs/ext4/super.c
>> ===================================================================
>> --- kvm.orig/fs/ext4/super.c
>> +++ kvm/fs/ext4/super.c
>> @@ -1455,7 +1455,7 @@ static int ext4_fill_flex_info(struct su
>>   	/* We allocate both existing and potentially added groups */
>>  	flex_group_count = ((sbi->s_groups_count + groups_per_flex - 1) +
>> -			    ((sbi->s_es->s_reserved_gdt_blocks +1 ) <<
>> +			    (le16_to_cpu(sbi->s_es->s_reserved_gdt_blocks + 1) <<
>>   
>
> I suspect that you want to do the le16_to_cpu() and _then_
> add the 1.  Otherwise, adding 1 to a different byte order
> value won't do quite what is expected or hoped for...

Yes.  And if someone ran sparse over the code both the initial error
and this varaint would be trivial to spot..

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

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux