From f5929cd814ca0a7012bf31d566c8bbd0cd469322 Mon Sep 17 00:00:00 2001 From: Filipe David Borba Manana Date: Wed, 31 Jul 2013 00:26:35 +0100 Subject: [PATCH] Btrfs: add missing error check to find_parent_nodes Signed-off-by: Filipe David Borba Manana Reviewed-by: Jan Schmidt Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- fs/btrfs/backref.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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,