Commit 6a0f414e authored by Brett Holman's avatar Brett Holman Committed by Kent Overstreet

bcachefs: Fix compiler warnings

Type size_t is architecture-specific. Fix warnings for some non-amd64
arches.
Signed-off-by: default avatarBrett Holman <bholman.devel@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 70d61a70
......@@ -653,7 +653,7 @@ static int __bch2_journal_reclaim(struct journal *j, bool direct)
atomic_long_read(&c->btree_key_cache.nr_dirty),
atomic_long_read(&c->btree_key_cache.nr_keys));
min_key_cache = min(bch2_nr_btree_keys_need_flush(c), 128UL);
min_key_cache = min(bch2_nr_btree_keys_need_flush(c), (size_t) 128);
nr_flushed = journal_flush_pins(j, seq_to_flush,
min_nr, min_key_cache);
......
......@@ -75,7 +75,7 @@ static inline void snapshots_seen_init(struct snapshots_seen *s)
static inline int snapshots_seen_add(struct bch_fs *c, struct snapshots_seen *s, u32 id)
{
if (s->nr == s->size) {
size_t new_size = max(s->size, 128UL) * 2;
size_t new_size = max(s->size, (size_t) 128) * 2;
u32 *d = krealloc(s->d, new_size * sizeof(s->d[0]), GFP_KERNEL);
if (!d) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment