[PATCH 7/9] Btrfs-progs: make extent_ref_type() match kernelspace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 extent-tree.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/extent-tree.c b/extent-tree.c
index b8403d6..fe74f99 100644
--- a/extent-tree.c
+++ b/extent-tree.c
@@ -967,17 +967,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)
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux