summaryrefslogtreecommitdiff
path: root/fs/bcachefs/btree_cache.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-03-03 08:03:01 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:55 +0300
commit3329cf1bb91d6293a96cf35ad72b2a2e1e1c0e3d (patch)
tree4454b632673b2d32057199effc301fc60e7586ef /fs/bcachefs/btree_cache.c
parent1306f87de399a0c791f03d68b50e03bdb3f409ae (diff)
downloadlinux-3329cf1bb91d6293a96cf35ad72b2a2e1e1c0e3d.tar.xz
bcachefs: Centralize btree node lock initialization
This fixes some confusion in the lockdep code due to initializing btree node/key cache locks with the same lockdep key, but different names. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_cache.c')
-rw-r--r--fs/bcachefs/btree_cache.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_cache.c b/fs/bcachefs/btree_cache.c
index 76cad6109297..9b331c319acc 100644
--- a/fs/bcachefs/btree_cache.c
+++ b/fs/bcachefs/btree_cache.c
@@ -119,8 +119,7 @@ static struct btree *__btree_node_mem_alloc(struct bch_fs *c, gfp_t gfp)
return NULL;
bkey_btree_ptr_init(&b->key);
- six_lock_init(&b->c.lock);
- lockdep_set_novalidate_class(&b->c.lock);
+ bch2_btree_lock_init(&b->c);
INIT_LIST_HEAD(&b->list);
INIT_LIST_HEAD(&b->write_blocked);
b->byte_order = ilog2(btree_bytes(c));