On Mon, Nov 06, 2017 at 05:03:33PM -0800, Darrick J. Wong wrote: > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > > In a directory data block, the zeroth bestfree item must point to the > longest free space. Therefore, when we check the bestfree block's > records against the data blocks, we only need to compare with bf[0] and > don't need the loop. > > The weird loop was most probably the result of an earlier refactoring > gone bad. > > Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> > Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> Looks good. Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> -- Dave Chinner david@xxxxxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html