summaryrefslogtreecommitdiff
path: root/extent-tree.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2013-04-26 16:06:08 -0500
committerDavid Sterba <dsterba@suse.cz>2013-08-09 14:32:28 +0200
commit2e89e55682d950d03ee9e0ff510f969b5b0bdcaf (patch)
treedc87f6e5506c3657743a007b907aa7d3348b5167 /extent-tree.c
parentba4f8cb41141ce5c03eb480c66ef7730eecf2efd (diff)
Btrfs-progs: make extent_ref_type() match kernelspace
extent_ref_type() contains inconsequential differences between kernelspace and userspace, and has since the initial commits to each. Just make userspace look like kernelspace. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'extent-tree.c')
-rw-r--r--extent-tree.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/extent-tree.c b/extent-tree.c
index e4582682..e4883903 100644
--- a/extent-tree.c
+++ b/extent-tree.c
@@ -954,17 +954,19 @@ static noinline int insert_tree_block_ref(struct btrfs_trans_handle *trans,
static inline int extent_ref_type(u64 parent, u64 owner)
{
+ int type;
if (owner < BTRFS_FIRST_FREE_OBJECTID) {
if (parent > 0)
- return BTRFS_SHARED_BLOCK_REF_KEY;
+ type = BTRFS_SHARED_BLOCK_REF_KEY;
else
- return BTRFS_TREE_BLOCK_REF_KEY;
+ type = BTRFS_TREE_BLOCK_REF_KEY;
} else {
if (parent > 0)
- return BTRFS_SHARED_DATA_REF_KEY;
+ type = BTRFS_SHARED_DATA_REF_KEY;
else
- return BTRFS_EXTENT_DATA_REF_KEY;
+ type = BTRFS_EXTENT_DATA_REF_KEY;
}
+ return type;
}
static int find_next_key(struct btrfs_path *path, struct btrfs_key *key)