summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-08-26 04:42:46 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:39 +0300
commit06a53943222be722e5f85782721e4701bcd424e8 (patch)
treef0f1925ab30f4eba2c2fb0b782e202100da40222
parent131dcd5af7e2f1b13c2c0baf3095d7e449eb9859 (diff)
downloadlinux-06a53943222be722e5f85782721e4701bcd424e8.tar.xz
bcachefs: Correctly initialize bkey_cached->lock
We need to use the right class for some assertions to work correctly. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r--fs/bcachefs/btree_key_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_key_cache.c b/fs/bcachefs/btree_key_cache.c
index 0e87c19effeb..cf41926b7f8e 100644
--- a/fs/bcachefs/btree_key_cache.c
+++ b/fs/bcachefs/btree_key_cache.c
@@ -181,7 +181,7 @@ bkey_cached_alloc(struct btree_key_cache *c)
ck = kmem_cache_alloc(bch2_key_cache, GFP_NOFS|__GFP_ZERO);
if (likely(ck)) {
INIT_LIST_HEAD(&ck->list);
- six_lock_init(&ck->c.lock);
+ __six_lock_init(&ck->c.lock, "b->c.lock", &bch2_btree_node_lock_key);
lockdep_set_novalidate_class(&ck->c.lock);
BUG_ON(!six_trylock_intent(&ck->c.lock));
BUG_ON(!six_trylock_write(&ck->c.lock));