summaryrefslogtreecommitdiff
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 26321524c186..97715bae7847 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -125,6 +125,11 @@ check_failed:
ins->flags = 0;
start_found = 0;
ret = search_slot(root, ins, &path, 0);
+ if (ret < 0) {
+ release_path(root, &path);
+ return ret;
+ }
+
while (1) {
l = &path.nodes[0]->leaf;
slot = path.slots[0];