• C
    Btrfs: use the right node in reada_for_balance · 8c594ea8
    Chris Mason 提交于
    reada_for_balance was using the wrong index into the path node array,
    so it wasn't reading the right blocks.  We never directly used the
    results of the read done by this function because the btree search is
    started over at the end.
    
    This fixes reada_for_balance to reada in the correct node and to
    avoid searching past the last slot in the node.  It also makes sure to
    hold the parent lock while we are finding the nodes to read.
    Signed-off-by: NChris Mason <chris.mason@oracle.com>
    8c594ea8
ctree.c 109.9 KB