diff options
| author | Diego Calleja <diegocg@gmail.com> | 2009-07-24 11:06:52 -0400 |
|---|---|---|
| committer | Chris Mason <chris.mason@oracle.com> | 2009-07-24 11:22:46 -0400 |
| commit | 20736abaa361bea488df6a1f66f6b37fb01107b9 (patch) | |
| tree | d4e55905f371b701d06f3aa74eb18c6a25f83186 /fs/btrfs | |
| parent | 817d52f8dba26d0295c26035531c30ce5f1e3c3e (diff) | |
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 <diegocg@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
| -rw-r--r-- | fs/btrfs/ctree.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index fdd423a550d6..91572091c0a4 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) | |||
| 557 | 557 | ||
| 558 | btrfs_disk_key_to_cpu(&k1, disk); | 558 | btrfs_disk_key_to_cpu(&k1, disk); |
| 559 | 559 | ||
| 560 | if (k1.objectid > k2->objectid) | 560 | return btrfs_comp_cpu_keys(&k1, k2); |
| 561 | return 1; | ||
| 562 | if (k1.objectid < k2->objectid) | ||
| 563 | return -1; | ||
| 564 | if (k1.type > k2->type) | ||
| 565 | return 1; | ||
| 566 | if (k1.type < k2->type) | ||
| 567 | return -1; | ||
| 568 | if (k1.offset > k2->offset) | ||
| 569 | return 1; | ||
| 570 | if (k1.offset < k2->offset) | ||
| 571 | return -1; | ||
| 572 | return 0; | ||
| 573 | } | 561 | } |
| 574 | 562 | ||
| 575 | /* | 563 | /* |
