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

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

 




On 1/29/20 12:29 PM, Christoph Hellwig wrote:
> On Wed, Jan 29, 2020 at 12:15:06PM -0600, Eric Sandeen wrote:
>>  {
>>  	uint64_t		off;
>> +	xfs_agblock_t		start;
>>  	int			adj;
>>  
>>  	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);
>> +	start = be32_to_cpu(key->rmap.rm_startblock) - adj;
>> +	key->rmap.rm_startblock = cpu_to_be32(start);
> 
> Do we really need the local variable?  Why not:
> 
> 	key->rmap.rm_startblock =
> 		cpu_to_be32(be32_to_cpu(key->rmap.rm_startblock) - adj);
> 

Sure

-Eric



[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