[PATCH 03/11] xfs: factor out xfs_dir2_leaf_find_stale
Dave Chinner
david at fromorbit.com
Wed Jul 13 05:28:25 CDT 2011
On Wed, Jul 13, 2011 at 03:16:54AM -0400, Christoph Hellwig wrote:
> On Wed, Jul 13, 2011 at 04:49:36PM +1000, Dave Chinner wrote:
> > > > + --*lowstale)
> > > > + continue;
> >
> > Only thing I was conerned about was the indenting on these loops.
> > Something like this:
> >
> > for (*lowstale = index - 1;
> > *lowstale >= 0 &&
> > leaf->ents[*lowstale].address !=
> > cpu_to_be32(XFS_DIR2_NULL_DATAPTR);
> > --*lowstale)
> > continue;
> >
> > means that at a glance it is easy to separate the loop control
> > statements from the body of the loop just by indentation.
>
> I tried to avoid changing anything here, but now that other people
> like me hate these uglies I think I have to ite the bullet and
> actually untangle those loops. The version below is what I'm submitting
> to testing now:
The new logic looks OK to me.
Cheers,
Dave.
--
Dave Chinner
david at fromorbit.com
More information about the xfs
mailing list