[PATCH 13/27] xfs: factor out xfs_dir2_leaf_find_entry
Christoph Hellwig
hch at infradead.org
Thu Jun 30 02:34:59 CDT 2011
On Thu, Jun 30, 2011 at 04:11:02PM +1000, Dave Chinner wrote:
> You could probably just return here, and that would remove the:
Indeed. We can do the same near the end, too. It means duplicating
the be16_add_cpu, but allows to directly return the expression that
lead to lep, so I did it.
> > + continue;
> > + }
> > + /*
> > + * If the low one is better, use it.
> > + */
>
> Line of whitespace before the comment.
Fixed.
> > + /*
> > + * The high one is better, so use that one.
> > + */
> > + } else {
>
> I prefer comments inside the else branch...
The else is completely gone now, fixing that issue.
> > - be16_add_cpu(&leaf->hdr.stale, -1);
> > - }
> > +
> > +
> > + lep = xfs_dir2_leaf_find_entry(leaf, index, compact, lowstale,
> > + highstale, &lfloglow, &lfloghigh);
> > +
>
> Only need one line of whitespace before the function call.
Fixed.
> > +
> > +
> > /*
> > * Insert the new entry, log everything.
> > */
> > + lep = xfs_dir2_leaf_find_entry(leaf, index, compact, lowstale,
> > + highstale, &lfloglow, &lfloghigh);
> > +
>
> Same for the whitespace before the comment.
Fixed.
More information about the xfs
mailing list