Skip to content

Commit

Permalink
Btrfs: Remove code duplication in comp_keys
Browse files Browse the repository at this point in the history
comp_keys is duplicating what is done in btrfs_comp_cpu_keys, so just
call it.

Signed-off-by: Diego Calleja <diegocg@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Diego Calleja authored and Chris Mason committed Jul 24, 2009
1 parent 817d52f commit 20736ab
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions fs/btrfs/ctree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/*
Expand Down

0 comments on commit 20736ab

Please sign in to comment.