diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/backref.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index 7301cdb4b2c..cf0df904347 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -301,10 +301,14 @@ static int __resolve_indirect_ref(struct btrfs_fs_info *fs_info, goto out; eb = path->nodes[level]; - if (!eb) { - WARN_ON(1); - ret = 1; - goto out; + while (!eb) { + if (!level) { + WARN_ON(1); + ret = 1; + goto out; + } + level--; + eb = path->nodes[level]; } ret = add_all_parents(root, path, parents, level, &ref->key_for_search, |