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/btree_gc.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/btree_gc.c')
-rw-r--r-- | fs/bcachefs/btree_gc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/bcachefs/btree_gc.c b/fs/bcachefs/btree_gc.c index 1f99c5cb3439..75ea243d4bbc 100644 --- a/fs/bcachefs/btree_gc.c +++ b/fs/bcachefs/btree_gc.c @@ -351,7 +351,7 @@ void bch2_mark_dev_superblock(struct bch_fs *c, struct bch_dev *ca, */ if (c) { lockdep_assert_held(&c->sb_lock); - percpu_down_read(&c->usage_lock); + percpu_down_read(&c->mark_lock); } else { preempt_disable(); } @@ -376,7 +376,7 @@ void bch2_mark_dev_superblock(struct bch_fs *c, struct bch_dev *ca, } if (c) { - percpu_up_read(&c->usage_lock); + percpu_up_read(&c->mark_lock); } else { preempt_enable(); } @@ -422,7 +422,7 @@ static void bch2_mark_allocator_buckets(struct bch_fs *c) size_t i, j, iter; unsigned ci; - percpu_down_read(&c->usage_lock); + percpu_down_read(&c->mark_lock); spin_lock(&c->freelist_lock); gc_pos_set(c, gc_pos_alloc(c, NULL)); @@ -458,7 +458,7 @@ static void bch2_mark_allocator_buckets(struct bch_fs *c) spin_unlock(&ob->lock); } - percpu_up_read(&c->usage_lock); + percpu_up_read(&c->mark_lock); } static void bch2_gc_free(struct bch_fs *c) @@ -578,7 +578,7 @@ static void bch2_gc_done(struct bch_fs *c, bool initial) #define copy_fs_field(_f, _msg, ...) \ copy_field(_f, "fs has wrong " _msg, ##__VA_ARGS__) - percpu_down_write(&c->usage_lock); + percpu_down_write(&c->mark_lock); if (initial) { bch2_gc_done_nocheck(c); @@ -698,7 +698,7 @@ static void bch2_gc_done(struct bch_fs *c, bool initial) preempt_enable(); } out: - percpu_up_write(&c->usage_lock); + percpu_up_write(&c->mark_lock); #undef copy_fs_field #undef copy_dev_field @@ -743,7 +743,7 @@ static int bch2_gc_start(struct bch_fs *c) } } - percpu_down_write(&c->usage_lock); + percpu_down_write(&c->mark_lock); for_each_member_device(ca, c, i) { struct bucket_array *dst = __bucket_array(ca, 1); @@ -757,7 +757,7 @@ static int bch2_gc_start(struct bch_fs *c) dst->b[b]._mark.gen = src->b[b].mark.gen; }; - percpu_up_write(&c->usage_lock); + percpu_up_write(&c->mark_lock); return bch2_ec_mem_alloc(c, true); } |