Commit bd7e82ee authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: kill ca->freelist_lock

All uses were supposed to be switched over to c->freelist_lock
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 4de77495
......@@ -427,7 +427,6 @@ struct bch_dev {
*/
alloc_fifo free[RESERVE_NR];
alloc_fifo free_inc;
spinlock_t freelist_lock;
u8 open_buckets_partial[OPEN_BUCKETS_COUNT];
unsigned open_buckets_partial_nr;
......
......@@ -107,10 +107,10 @@ static bool have_copygc_reserve(struct bch_dev *ca)
{
bool ret;
spin_lock(&ca->freelist_lock);
spin_lock(&ca->fs->freelist_lock);
ret = fifo_full(&ca->free[RESERVE_MOVINGGC]) ||
ca->allocator_state != ALLOCATOR_RUNNING;
spin_unlock(&ca->freelist_lock);
spin_unlock(&ca->fs->freelist_lock);
return ret;
}
......
......@@ -1059,7 +1059,6 @@ static struct bch_dev *__bch2_dev_alloc(struct bch_fs *c,
writepoint_init(&ca->copygc_write_point, BCH_DATA_USER);
spin_lock_init(&ca->freelist_lock);
bch2_dev_copygc_init(ca);
INIT_WORK(&ca->io_error_work, bch2_io_error_work);
......
......@@ -775,7 +775,7 @@ static ssize_t show_reserve_stats(struct bch_dev *ca, char *buf)
struct printbuf out = _PBUF(buf, PAGE_SIZE);
enum alloc_reserve i;
spin_lock(&ca->freelist_lock);
spin_lock(&ca->fs->freelist_lock);
pr_buf(&out, "free_inc:\t%zu\t%zu\n",
fifo_used(&ca->free_inc),
......@@ -786,7 +786,7 @@ static ssize_t show_reserve_stats(struct bch_dev *ca, char *buf)
fifo_used(&ca->free[i]),
ca->free[i].size);
spin_unlock(&ca->freelist_lock);
spin_unlock(&ca->fs->freelist_lock);
return out.pos - buf;
}
......
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