Btrfs: fix to catch all errors when resolving indirect ref
We can only tolerate ENOENT here, for other errors, we should return directly. Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com> Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Chris Mason <clm@fb.com>
This commit is contained in:

committed by
Chris Mason

parent
538f72cdf0
commit
95def2ede1
@@ -388,10 +388,16 @@ static int __resolve_indirect_refs(struct btrfs_fs_info *fs_info,
|
|||||||
continue;
|
continue;
|
||||||
err = __resolve_indirect_ref(fs_info, path, time_seq, ref,
|
err = __resolve_indirect_ref(fs_info, path, time_seq, ref,
|
||||||
parents, extent_item_pos);
|
parents, extent_item_pos);
|
||||||
if (err == -ENOMEM)
|
/*
|
||||||
goto out;
|
* we can only tolerate ENOENT,otherwise,we should catch error
|
||||||
if (err)
|
* and return directly.
|
||||||
|
*/
|
||||||
|
if (err == -ENOENT) {
|
||||||
continue;
|
continue;
|
||||||
|
} else if (err) {
|
||||||
|
ret = err;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
/* we put the first parent into the ref at hand */
|
/* we put the first parent into the ref at hand */
|
||||||
ULIST_ITER_INIT(&uiter);
|
ULIST_ITER_INIT(&uiter);
|
||||||
|
Reference in New Issue
Block a user