Btrfs: fix btrfs_unlock_up_safe to walk the entire path

btrfs_unlock_up_safe would break out at the first NULL node entry or
unlocked node it found in the path.

Some of the callers have missing nodes at the lower levels of the path, so this
commit fixes things to check all the nodes in the path before returning.

Signed-off-by: Chris Mason <chris.mason@oracle.com>

+2 -2
+2 -2
fs/btrfs/ctree.c
··· 1439 1440 for (i = level; i < BTRFS_MAX_LEVEL; i++) { 1441 if (!path->nodes[i]) 1442 - break; 1443 if (!path->locks[i]) 1444 - break; 1445 btrfs_tree_unlock(path->nodes[i]); 1446 path->locks[i] = 0; 1447 }
··· 1439 1440 for (i = level; i < BTRFS_MAX_LEVEL; i++) { 1441 if (!path->nodes[i]) 1442 + continue; 1443 if (!path->locks[i]) 1444 + continue; 1445 btrfs_tree_unlock(path->nodes[i]); 1446 path->locks[i] = 0; 1447 }