aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/zfs_rlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/zfs/zfs_rlock.c')
-rw-r--r--module/zfs/zfs_rlock.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/module/zfs/zfs_rlock.c b/module/zfs/zfs_rlock.c
index fd3e8a68d..d3f68537f 100644
--- a/module/zfs/zfs_rlock.c
+++ b/module/zfs/zfs_rlock.c
@@ -617,14 +617,10 @@ zfs_range_reduce(rl_t *rl, uint64_t off, uint64_t len)
int
zfs_range_compare(const void *arg1, const void *arg2)
{
- const rl_t *rl1 = arg1;
- const rl_t *rl2 = arg2;
-
- if (rl1->r_off > rl2->r_off)
- return (1);
- if (rl1->r_off < rl2->r_off)
- return (-1);
- return (0);
+ const rl_t *rl1 = (const rl_t *)arg1;
+ const rl_t *rl2 = (const rl_t *)arg2;
+
+ return (AVL_CMP(rl1->r_off, rl2->r_off));
}
#ifdef _KERNEL