xfs: fix rmap key and record comparison functions
[linux-2.6-microblaze.git] / fs / xfs / libxfs / xfs_rmap_btree.c
index beb81c8..577a663 100644 (file)
@@ -243,8 +243,8 @@ xfs_rmapbt_key_diff(
        else if (y > x)
                return -1;
 
-       x = XFS_RMAP_OFF(be64_to_cpu(kp->rm_offset));
-       y = rec->rm_offset;
+       x = be64_to_cpu(kp->rm_offset);
+       y = xfs_rmap_irec_offset_pack(rec);
        if (x > y)
                return 1;
        else if (y > x)
@@ -275,8 +275,8 @@ xfs_rmapbt_diff_two_keys(
        else if (y > x)
                return -1;
 
-       x = XFS_RMAP_OFF(be64_to_cpu(kp1->rm_offset));
-       y = XFS_RMAP_OFF(be64_to_cpu(kp2->rm_offset));
+       x = be64_to_cpu(kp1->rm_offset);
+       y = be64_to_cpu(kp2->rm_offset);
        if (x > y)
                return 1;
        else if (y > x)
@@ -390,8 +390,8 @@ xfs_rmapbt_keys_inorder(
                return 1;
        else if (a > b)
                return 0;
-       a = XFS_RMAP_OFF(be64_to_cpu(k1->rmap.rm_offset));
-       b = XFS_RMAP_OFF(be64_to_cpu(k2->rmap.rm_offset));
+       a = be64_to_cpu(k1->rmap.rm_offset);
+       b = be64_to_cpu(k2->rmap.rm_offset);
        if (a <= b)
                return 1;
        return 0;
@@ -420,8 +420,8 @@ xfs_rmapbt_recs_inorder(
                return 1;
        else if (a > b)
                return 0;
-       a = XFS_RMAP_OFF(be64_to_cpu(r1->rmap.rm_offset));
-       b = XFS_RMAP_OFF(be64_to_cpu(r2->rmap.rm_offset));
+       a = be64_to_cpu(r1->rmap.rm_offset);
+       b = be64_to_cpu(r2->rmap.rm_offset);
        if (a <= b)
                return 1;
        return 0;