xfs
[Top] [All Lists]

Re: [PATCH] xfs: remove pointless pointer increment in xfs_dir2_block_co

To: Mark Tinguely <tinguely@xxxxxxx>
Subject: Re: [PATCH] xfs: remove pointless pointer increment in xfs_dir2_block_compact()
From: Eric Sandeen <sandeen@xxxxxxxxxx>
Date: Wed, 09 Apr 2014 16:35:33 -0500
Cc: xfs-oss <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <5345BCE1.7070900@xxxxxxx>
References: <5345ADF9.2030402@xxxxxxxxxx> <5345BCE1.7070900@xxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.4.0
On 4/9/14, 4:34 PM, Mark Tinguely wrote:
> On 04/09/14 15:30, Eric Sandeen wrote:
>> xfs_dir2_block_compact() is passed a pointer to *blp, and
>> advances it locally - but nobody uses the pointer (locally)
>> after that.
>>
>> This behavior came about as part of prior refactoring,
>>
>> 20f7e9f xfs: factor dir2 block read operations
>>
>> and looking at the code as it was before, it seems quite clear
>> that this change introduced a bug; the pre-refactoring code
>> expects blp to be modified after compaction.
>> And indeed it did; see this commit which fixed it:
>>
>> 37f1356 xfs: recalculate leaf entry pointer after compacting a dir2 block
>>
>> So the bug was introduced & resolved in the 3.8 cycle.
>>
>> Whoops.  Well, it's fixed now, and mystery solved; just remove
>> the now-pointless local increment of the blp pointer.
>>
>> (I guess we should have run clang earlier!)
>>
>> Signed-off-by: Eric Sandeen<sandeen@xxxxxxxxxx>
>> ---
> 
> Harmless, but yes it should be removed.

Harmless now that we fixed it the hard way back in January...  ;)

thanks for the reviews,
-Eric

> Reviewed-by: Mark Tinguely <tinguely@xxxxxxx>

<Prev in Thread] Current Thread [Next in Thread>