From eca4910b42ce5b4b6ccb8a7c3210d119b033721d 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 8bc5e8ccb0918..980e85a264c04 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, -- 2.39.5