lkml.org 
[lkml]   [2015]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4 linux-next] xfs: use swap() in xfs_dir2_leafn_rebalance()


> On 18 May 2015 at 19:19 Al Viro <viro@ZenIV.linux.org.uk> wrote:
>
>
> On Mon, May 18, 2015 at 07:13:48PM +0200, Fabian Frederick wrote:
> >      * If the block order is wrong, swap the arguments.
> >      */
> > -   if ((swap = xfs_dir2_leafn_order(dp, blk1->bp, blk2->bp))) {
> > -           xfs_da_state_blk_t      *tmp;   /* temp for block swap */
> > +   swap = xfs_dir2_leafn_order(dp, blk1->bp, blk2->bp);
> > +   if (swap)
> > +           swap(blk1, blk2);
>
> Egads...  Have you even read what you'd written?  Yes, sure, preprocessor
> will do the right thing, but it's a very noticable annoyance for somebody
> reading that.  Rename the bleeding flag, please.

I wanted to focus on the swap() update in this small patchset (some other things
should be done in there like have xfs_dir2_leafn_order() return bool) but I can
rename it in something like need_swap. Do I need to resend the 4 patches Dave ?

Regards,
Fabian


\
 
 \ /
  Last update: 2015-05-18 20:41    [W:0.087 / U:0.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site