From 3ea2b1e12898154d6fae49b22a3509521ba49d38 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Fri, 12 Apr 2019 04:54:12 -0400 Subject: bcachefs: cmp_int() Signed-off-by: Kent Overstreet --- fs/bcachefs/movinggc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs/bcachefs/movinggc.c') diff --git a/fs/bcachefs/movinggc.c b/fs/bcachefs/movinggc.c index 78d9ca8bfc5e..aba13e6ea4ff 100644 --- a/fs/bcachefs/movinggc.c +++ b/fs/bcachefs/movinggc.c @@ -54,7 +54,7 @@ static inline int sectors_used_cmp(copygc_heap *heap, struct copygc_heap_entry l, struct copygc_heap_entry r) { - return (l.sectors > r.sectors) - (l.sectors < r.sectors); + return cmp_int(l.sectors, r.sectors); } static int bucket_offset_cmp(const void *_l, const void *_r, size_t size) @@ -62,7 +62,7 @@ static int bucket_offset_cmp(const void *_l, const void *_r, size_t size) const struct copygc_heap_entry *l = _l; const struct copygc_heap_entry *r = _r; - return (l->offset > r->offset) - (l->offset < r->offset); + return cmp_int(l->offset, r->offset); } static bool __copygc_pred(struct bch_dev *ca, -- cgit v1.2.3