diff options
author | Chris Mason <chris.mason@oracle.com> | 2009-02-04 09:31:42 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2009-02-04 09:31:42 -0500 |
commit | 12f4daccfc3732280debba8f9ba49720372de831 (patch) | |
tree | 922d52b907ea8495ab9362a789d607ed7f61b637 | |
parent | 4d081c41a4f98aecb5e86ef7d3e644cc7b52131f (diff) | |
download | op-kernel-dev-12f4daccfc3732280debba8f9ba49720372de831.zip op-kernel-dev-12f4daccfc3732280debba8f9ba49720372de831.tar.gz |
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>
-rw-r--r-- | fs/btrfs/ctree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index f6916ce..0d1e3b9 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -1439,9 +1439,9 @@ noinline void btrfs_unlock_up_safe(struct btrfs_path *path, int level) for (i = level; i < BTRFS_MAX_LEVEL; i++) { if (!path->nodes[i]) - break; + continue; if (!path->locks[i]) - break; + continue; btrfs_tree_unlock(path->nodes[i]); path->locks[i] = 0; } |