summaryrefslogtreecommitdiff
path: root/libbcachefs/clock.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbcachefs/clock.c')
-rw-r--r--libbcachefs/clock.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libbcachefs/clock.c b/libbcachefs/clock.c
index 68ac62b4..650be8ce 100644
--- a/libbcachefs/clock.c
+++ b/libbcachefs/clock.c
@@ -5,9 +5,11 @@
#include <linux/kthread.h>
#include <linux/preempt.h>
-static inline bool io_timer_cmp(struct io_timer *l, struct io_timer *r)
+static inline long io_timer_cmp(io_timer_heap *h,
+ struct io_timer *l,
+ struct io_timer *r)
{
- return time_after(l->expire, r->expire);
+ return l->expire - r->expire;
}
void bch2_io_timer_add(struct io_clock *clock, struct io_timer *timer)