diff options
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r-- | fs/btrfs/ctree.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 5edbcc09b3cc..40f0e0cb804b 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c | |||
@@ -1352,6 +1352,8 @@ again: | |||
1352 | free_extent_buffer(tmp); | 1352 | free_extent_buffer(tmp); |
1353 | goto again; | 1353 | goto again; |
1354 | } else { | 1354 | } else { |
1355 | if (tmp) | ||
1356 | free_extent_buffer(tmp); | ||
1355 | b = read_node_slot(root, b, slot); | 1357 | b = read_node_slot(root, b, slot); |
1356 | } | 1358 | } |
1357 | } | 1359 | } |
@@ -3048,7 +3050,8 @@ int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path) | |||
3048 | free_extent_buffer(c); | 3050 | free_extent_buffer(c); |
3049 | path->nodes[level] = next; | 3051 | path->nodes[level] = next; |
3050 | path->slots[level] = 0; | 3052 | path->slots[level] = 0; |
3051 | path->locks[level] = 1; | 3053 | if (!path->skip_locking) |
3054 | path->locks[level] = 1; | ||
3052 | if (!level) | 3055 | if (!level) |
3053 | break; | 3056 | break; |
3054 | if (level == 1 && path->locks[1] && path->reada) | 3057 | if (level == 1 && path->locks[1] && path->reada) |