aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 7f156d9b7089..3767744f659e 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -41,9 +41,7 @@ static int inc_block_ref(struct btrfs_root *root, u64 blocknr)
41 BUG(); 41 BUG();
42 BUG_ON(ret != 0); 42 BUG_ON(ret != 0);
43 l = &path.nodes[0]->leaf; 43 l = &path.nodes[0]->leaf;
44 item = (struct btrfs_extent_item *)(l->data + 44 item = btrfs_item_ptr(l, path.slots[0], struct btrfs_extent_item);
45 btrfs_item_offset(l->items +
46 path.slots[0]));
47 refs = btrfs_extent_refs(item); 45 refs = btrfs_extent_refs(item);
48 btrfs_set_extent_refs(item, refs + 1); 46 btrfs_set_extent_refs(item, refs + 1);
49 47
@@ -69,9 +67,7 @@ static int lookup_block_ref(struct btrfs_root *root, u64 blocknr, u32 *refs)
69 if (ret != 0) 67 if (ret != 0)
70 BUG(); 68 BUG();
71 l = &path.nodes[0]->leaf; 69 l = &path.nodes[0]->leaf;
72 item = (struct btrfs_extent_item *)(l->data + 70 item = btrfs_item_ptr(l, path.slots[0], struct btrfs_extent_item);
73 btrfs_item_offset(l->items +
74 path.slots[0]));
75 *refs = btrfs_extent_refs(item); 71 *refs = btrfs_extent_refs(item);
76 btrfs_release_path(root->extent_root, &path); 72 btrfs_release_path(root->extent_root, &path);
77 return 0; 73 return 0;