projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
131dcd5
)
bcachefs: Correctly initialize bkey_cached->lock
author
Kent Overstreet
<kent.overstreet@linux.dev>
Fri, 26 Aug 2022 01:42:46 +0000
(21:42 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:39 +0000
(17:09 -0400)
We need to use the right class for some assertions to work correctly.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_key_cache.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/btree_key_cache.c
b/fs/bcachefs/btree_key_cache.c
index 0e87c19effeb306c20868493c5f04d88c1210a40..cf41926b7f8e1385a60d645e325b894f5a35cedc 100644
(file)
--- 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));