Skip to content
Commit 8c594ea8 authored by Chris Mason's avatar Chris Mason
Browse files

Btrfs: use the right node in reada_for_balance



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: default avatarChris Mason <chris.mason@oracle.com>
parent 11c8349b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment