summaryrefslogtreecommitdiff
path: root/fs/bcachefs/btree_key_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_key_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_key_cache.c')
-rw-r--r--fs/bcachefs/btree_key_cache.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_key_cache.c b/fs/bcachefs/btree_key_cache.c
index 67db6b9d8e10..1e692c0a2f3a 100644
--- a/fs/bcachefs/btree_key_cache.c
+++ b/fs/bcachefs/btree_key_cache.c
@@ -282,8 +282,7 @@ bkey_cached_alloc(struct btree_trans *trans, struct btree_path *path,
return NULL;
init:
INIT_LIST_HEAD(&ck->list);
- __six_lock_init(&ck->c.lock, "b->c.lock", &bch2_btree_node_lock_key);
- lockdep_set_novalidate_class(&ck->c.lock);
+ bch2_btree_lock_init(&ck->c);
if (pcpu_readers)
six_lock_pcpu_alloc(&ck->c.lock);