diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-11-26 08:13:33 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:08:13 +0300 |
commit | 9166b41db1ded0ed284ae40fbe5ec5b83191cc65 (patch) | |
tree | 3848dd319a16867843ab5a4a1d3f00ff7abe95f4 /fs/bcachefs/alloc_foreground.c | |
parent | 76640280ac45e2d56f5bf7c519b10653b9361fcd (diff) | |
download | linux-9166b41db1ded0ed284ae40fbe5ec5b83191cc65.tar.xz |
bcachefs: s/usage_lock/mark_lock
better describes what it's for, and we're going to call a new lock
usage_lock
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_foreground.c')
-rw-r--r-- | fs/bcachefs/alloc_foreground.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/bcachefs/alloc_foreground.c b/fs/bcachefs/alloc_foreground.c index ddcf2c407764..3e77af4305a5 100644 --- a/fs/bcachefs/alloc_foreground.c +++ b/fs/bcachefs/alloc_foreground.c @@ -101,7 +101,7 @@ void __bch2_open_bucket_put(struct bch_fs *c, struct open_bucket *ob) return; } - percpu_down_read(&c->usage_lock); + percpu_down_read(&c->mark_lock); spin_lock(&ob->lock); bch2_mark_alloc_bucket(c, ca, PTR_BUCKET_NR(ca, &ob->ptr), @@ -109,7 +109,7 @@ void __bch2_open_bucket_put(struct bch_fs *c, struct open_bucket *ob) ob->valid = false; spin_unlock(&ob->lock); - percpu_up_read(&c->usage_lock); + percpu_up_read(&c->mark_lock); spin_lock(&c->freelist_lock); ob->freelist = c->open_buckets_freelist; @@ -441,7 +441,7 @@ static int ec_stripe_alloc(struct bch_fs *c, struct ec_stripe_head *h) open_bucket_for_each(c, &h->blocks, ob, i) __clear_bit(ob->ptr.dev, devs.d); - percpu_down_read(&c->usage_lock); + percpu_down_read(&c->mark_lock); rcu_read_lock(); if (h->parity.nr < h->redundancy) { @@ -477,12 +477,12 @@ static int ec_stripe_alloc(struct bch_fs *c, struct ec_stripe_head *h) } rcu_read_unlock(); - percpu_up_read(&c->usage_lock); + percpu_up_read(&c->mark_lock); return bch2_ec_stripe_new_alloc(c, h); err: rcu_read_unlock(); - percpu_up_read(&c->usage_lock); + percpu_up_read(&c->mark_lock); return -1; } @@ -638,7 +638,7 @@ static int open_bucket_add_buckets(struct bch_fs *c, if (*nr_effective >= nr_replicas) return 0; - percpu_down_read(&c->usage_lock); + percpu_down_read(&c->mark_lock); rcu_read_lock(); retry_blocking: @@ -655,7 +655,7 @@ retry_blocking: } rcu_read_unlock(); - percpu_up_read(&c->usage_lock); + percpu_up_read(&c->mark_lock); return ret; } |