]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/alloc_background.h
Update bcachefs sources to c3e4d892b77b mean and variance: Promote to lib/math
[bcachefs-tools-debian] / libbcachefs / alloc_background.h
index 72bb8491fe743042b81aed50d72afc4ee77f02c1..96671f166dd8053a7842fdda13e9afd14e62144b 100644 (file)
@@ -84,9 +84,9 @@ static inline unsigned bch2_bucket_sectors_dirty(struct bch_alloc_v4 a)
 static inline unsigned bch2_bucket_sectors_fragmented(struct bch_dev *ca,
                                                 struct bch_alloc_v4 a)
 {
-       unsigned d = bch2_bucket_sectors_dirty(a);
+       int d = bch2_bucket_sectors_dirty(a);
 
-       return d ? max(0U, ca->mi.bucket_size - d) : 0;
+       return d ? max(0, ca->mi.bucket_size - d) : 0;
 }
 
 static inline u64 alloc_lru_idx_read(struct bch_alloc_v4 a)