Commit 11f6ed36 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix a locking bug

Dropping the wrong kind of lock can't lead to anything good...
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 1d60b999
...@@ -114,7 +114,7 @@ static inline void btree_node_write_if_need(struct bch_fs *c, struct btree *b, ...@@ -114,7 +114,7 @@ static inline void btree_node_write_if_need(struct bch_fs *c, struct btree *b,
break; break;
} }
six_unlock_read(&b->c.lock); six_unlock_type(&b->c.lock, lock_held);
btree_node_wait_on_io(b); btree_node_wait_on_io(b);
btree_node_lock_type(c, b, lock_held); btree_node_lock_type(c, b, lock_held);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment