]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/clock.c
Update bcachefs sources to e99d29e402 bcachefs: zstd support, compression refactoring
[bcachefs-tools-debian] / libbcachefs / clock.c
index 3c3649f0862c8779307ef2ce8271ba8eee79c460..650be8cebe8fea8ee8f3ac1e9747d0ee47ab8172 100644 (file)
@@ -3,10 +3,13 @@
 
 #include <linux/freezer.h>
 #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)