Re: [PATCH 2/2 V3] xfs: don't take addresses of packed xfs_rmap_key member

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

 



On 2/26/20 10:06 AM, Darrick J. Wong wrote:
> On Wed, Jan 29, 2020 at 12:35:21PM -0600, Eric Sandeen wrote:

...

>> @@ -187,7 +187,9 @@ xfs_rmapbt_init_high_key_from_rec(
>>  	adj = be32_to_cpu(rec->rmap.rm_blockcount) - 1;
>>  
>>  	key->rmap.rm_startblock = rec->rmap.rm_startblock;
>> -	be32_add_cpu(&key->rmap.rm_startblock, adj);
>> +	/* do this manually to avoid gcc warning about alignment */
>> +	key->rmap.rm_startblock =
>> +		cpu_to_be32(be32_to_cpu(key->rmap.rm_startblock) - adj);
> 
> <blink>
> 
> This should be getting the value from rec->rmap, not key->rmap.
> 
> This should be adding adj, not subtracting it, since that's what the
> original code did.

*sigh* I got nothin' here tbh.



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux