aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/backref.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/backref.c')
-rw-r--r--fs/btrfs/backref.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index 0552a599b28f..3775947429b2 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -185,6 +185,9 @@ static int __add_prelim_ref(struct list_head *head, u64 root_id,
185{ 185{
186 struct __prelim_ref *ref; 186 struct __prelim_ref *ref;
187 187
188 if (root_id == BTRFS_DATA_RELOC_TREE_OBJECTID)
189 return 0;
190
188 ref = kmem_cache_alloc(btrfs_prelim_ref_cache, gfp_mask); 191 ref = kmem_cache_alloc(btrfs_prelim_ref_cache, gfp_mask);
189 if (!ref) 192 if (!ref)
190 return -ENOMEM; 193 return -ENOMEM;
@@ -323,8 +326,7 @@ static int __resolve_indirect_ref(struct btrfs_fs_info *fs_info,
323 326
324 eb = path->nodes[level]; 327 eb = path->nodes[level];
325 while (!eb) { 328 while (!eb) {
326 if (!level) { 329 if (WARN_ON(!level)) {
327 WARN_ON(1);
328 ret = 1; 330 ret = 1;
329 goto out; 331 goto out;
330 } 332 }
@@ -1619,7 +1621,7 @@ static int iterate_inode_refs(u64 inum, struct btrfs_root *fs_root,
1619 btrfs_set_lock_blocking_rw(eb, BTRFS_READ_LOCK); 1621 btrfs_set_lock_blocking_rw(eb, BTRFS_READ_LOCK);
1620 btrfs_release_path(path); 1622 btrfs_release_path(path);
1621 1623
1622 item = btrfs_item_nr(eb, slot); 1624 item = btrfs_item_nr(slot);
1623 iref = btrfs_item_ptr(eb, slot, struct btrfs_inode_ref); 1625 iref = btrfs_item_ptr(eb, slot, struct btrfs_inode_ref);
1624 1626
1625 for (cur = 0; cur < btrfs_item_size(eb, item); cur += len) { 1627 for (cur = 0; cur < btrfs_item_size(eb, item); cur += len) {