From: Diego Calleja Date: Fri, 24 Jul 2009 15:06:52 +0000 (-0400) Subject: Btrfs: Remove code duplication in comp_keys X-Git-Tag: v2.6.31-rc5~7^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=20736abaa361bea488df6a1f66f6b37fb01107b9;p=platform%2Fkernel%2Flinux-exynos.git Btrfs: Remove code duplication in comp_keys comp_keys is duplicating what is done in btrfs_comp_cpu_keys, so just call it. Signed-off-by: Diego Calleja Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index fdd423a..9157209 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -557,19 +557,7 @@ static int comp_keys(struct btrfs_disk_key *disk, struct btrfs_key *k2) btrfs_disk_key_to_cpu(&k1, disk); - if (k1.objectid > k2->objectid) - return 1; - if (k1.objectid < k2->objectid) - return -1; - if (k1.type > k2->type) - return 1; - if (k1.type < k2->type) - return -1; - if (k1.offset > k2->offset) - return 1; - if (k1.offset < k2->offset) - return -1; - return 0; + return btrfs_comp_cpu_keys(&k1, k2); } /*