diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-06-13 23:07:36 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-07-15 01:00:15 +0200 |
commit | b0d3ab531f07b6fc22ed9b84e7b9a5ff9be90df9 (patch) | |
tree | 567841ec65bd0bc955324f1cd68b9908eb0af8d1 /fs/bcachefs/alloc_background.c | |
parent | bcachefs: per_cpu_sum() (diff) | |
download | linux-b0d3ab531f07b6fc22ed9b84e7b9a5ff9be90df9.tar.xz linux-b0d3ab531f07b6fc22ed9b84e7b9a5ff9be90df9.zip |
bcachefs: Reduce the scope of gc_lock
gc_lock is now only for synchronization between check_alloc_info and
interior btree updates - nothing else
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_background.c')
-rw-r--r-- | fs/bcachefs/alloc_background.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c index 23e4aa9baa3a..54e066ee8dca 100644 --- a/fs/bcachefs/alloc_background.c +++ b/fs/bcachefs/alloc_background.c @@ -596,8 +596,6 @@ int bch2_alloc_read(struct bch_fs *c) struct bch_dev *ca = NULL; int ret; - down_read(&c->gc_lock); - if (c->sb.version_upgrade_complete >= bcachefs_metadata_version_bucket_gens) { ret = for_each_btree_key(trans, iter, BTREE_ID_bucket_gens, POS_MIN, BTREE_ITER_prefetch, k, ({ @@ -646,7 +644,6 @@ int bch2_alloc_read(struct bch_fs *c) bch2_dev_put(ca); bch2_trans_put(trans); - up_read(&c->gc_lock); bch_err_fn(c, ret); return ret; |