summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/backref.c
diff options
context:
space:
mode:
authorFilipe David Borba Manana2013-07-31 01:26:35 +0200
committerChris Mason2013-09-01 14:04:44 +0200
commitf5929cd814ca0a7012bf31d566c8bbd0cd469322 (patch)
tree42c286cb00b30f09b55a3efe7ba54b2e09aaad74 /fs/btrfs/backref.c
parentBtrfs: optimize function btrfs_read_chunk_tree (diff)
downloadkernel-qcow2-linux-f5929cd814ca0a7012bf31d566c8bbd0cd469322.tar.gz
kernel-qcow2-linux-f5929cd814ca0a7012bf31d566c8bbd0cd469322.tar.xz
kernel-qcow2-linux-f5929cd814ca0a7012bf31d566c8bbd0cd469322.zip
Btrfs: add missing error check to find_parent_nodes
Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com> Reviewed-by: Jan Schmidt <list.btrfs@jan-o-sch.net> Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/backref.c')
-rw-r--r--fs/btrfs/backref.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index 8bc5e8ccb091..980e85a264c0 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -935,8 +935,10 @@ again:
}
ret = find_extent_in_eb(eb, bytenr,
*extent_item_pos, &eie);
- ref->inode_list = eie;
free_extent_buffer(eb);
+ if (ret < 0)
+ goto out;
+ ref->inode_list = eie;
}
ret = ulist_add_merge(refs, ref->parent,
(uintptr_t)ref->inode_list,