mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 15:15:47 +00:00
bcachefs: Ensure we wake up threads locking node when reusing it
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
f805824220
commit
760992aac8
2 changed files with 2 additions and 2 deletions
|
@ -125,6 +125,8 @@ void bch2_btree_node_hash_remove(struct btree_cache *bc, struct btree *b)
|
|||
|
||||
/* Cause future lookups for this node to fail: */
|
||||
b->hash_val = 0;
|
||||
|
||||
six_lock_wakeup_all(&b->c.lock);
|
||||
}
|
||||
|
||||
int __bch2_btree_node_hash_insert(struct btree_cache *bc, struct btree *b)
|
||||
|
|
|
@ -138,8 +138,6 @@ static void __btree_node_free(struct bch_fs *c, struct btree *b)
|
|||
|
||||
bch2_btree_node_hash_remove(&c->btree_cache, b);
|
||||
|
||||
six_lock_wakeup_all(&b->c.lock);
|
||||
|
||||
mutex_lock(&c->btree_cache.lock);
|
||||
list_move(&b->list, &c->btree_cache.freeable);
|
||||
mutex_unlock(&c->btree_cache.lock);
|
||||
|
|
Loading…
Reference in a new issue