Commit 93ee2c4b authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Don't open code closure_nr_remaining()

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent df5a915a
......@@ -2385,7 +2385,7 @@ void bch2_btree_updates_to_text(struct printbuf *out, struct bch_fs *c)
as,
as->mode,
as->nodes_written,
atomic_read(&as->cl.remaining) & CLOSURE_REMAINING_MASK,
closure_nr_remaining(&as->cl),
as->journal.seq);
mutex_unlock(&c->btree_interior_update_lock);
}
......
......@@ -415,7 +415,7 @@ void bch2_update_unwritten_extent(struct btree_trans *trans,
break;
}
if ((atomic_read(&cl.remaining) & CLOSURE_REMAINING_MASK) != 1) {
if (closure_nr_remaining(&cl) != 1) {
bch2_trans_unlock(trans);
closure_sync(&cl);
}
......
......@@ -478,7 +478,7 @@ int bch2_extent_fallocate(struct btree_trans *trans,
ret = bch2_extent_update(trans, inum, iter, new.k, &disk_res,
0, i_sectors_delta, true);
out:
if ((atomic_read(&cl.remaining) & CLOSURE_REMAINING_MASK) != 1) {
if (closure_nr_remaining(&cl) != 1) {
bch2_trans_unlock(trans);
closure_sync(&cl);
}
......
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