mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 10:45:49 +00:00
bcachefs: Fix btree_node_write_blocked() not being cleared
The btree_node_write_blocked bit was a later addition to this code, it only mirrors the state of the b->write_blocked list (empty or nonempty) - unfortunately, when it was added it wasn't correctly kept in sync - oops. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
434b1c75a4
commit
06ab86d596
@ -161,6 +161,7 @@ static void __btree_node_free(struct bch_fs *c, struct btree *b)
|
||||
{
|
||||
trace_and_count(c, btree_node_free, c, b);
|
||||
|
||||
BUG_ON(btree_node_write_blocked(b));
|
||||
BUG_ON(btree_node_dirty(b));
|
||||
BUG_ON(btree_node_need_write(b));
|
||||
BUG_ON(b == btree_node_root(c, b));
|
||||
@ -807,6 +808,7 @@ static void btree_update_updated_node(struct btree_update *as, struct btree *b)
|
||||
|
||||
BUG_ON(as->mode != BTREE_INTERIOR_NO_UPDATE);
|
||||
BUG_ON(!btree_node_dirty(b));
|
||||
BUG_ON(!b->c.level);
|
||||
|
||||
as->mode = BTREE_INTERIOR_UPDATING_NODE;
|
||||
as->b = b;
|
||||
@ -976,6 +978,7 @@ static void bch2_btree_interior_update_will_free_node(struct btree_update *as,
|
||||
|
||||
clear_btree_node_dirty_acct(c, b);
|
||||
clear_btree_node_need_write(b);
|
||||
clear_btree_node_write_blocked(b);
|
||||
|
||||
/*
|
||||
* Does this node have unwritten data that has a pin on the journal?
|
||||
|
Loading…
Reference in New Issue
Block a user