bcachefs: Don't open code closure_nr_remaining()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet
2023-08-12 16:51:45 -04:00
parent df5a915a15
commit 93ee2c4b21
3 changed files with 3 additions and 3 deletions

View File

@@ -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);
}

View File

@@ -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);
}

View File

@@ -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);
}