bcachefs: Add a missing wakeup

This fixes a rare bug with bch2_btree_flush_all_writes() getting stuck.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
Kent Overstreet
2022-03-10 17:35:06 -05:00
committed by Kent Overstreet
parent f6c92ebbb8
commit cc23255e9a

View File

@@ -1622,6 +1622,8 @@ static void __btree_node_write_done(struct bch_fs *c, struct btree *b)
if (new & (1U << BTREE_NODE_write_in_flight))
__bch2_btree_node_write(c, b, BTREE_WRITE_ALREADY_STARTED);
else
wake_up_bit(&b->flags, BTREE_NODE_write_in_flight);
}
static void btree_node_write_done(struct bch_fs *c, struct btree *b)
@@ -2091,7 +2093,6 @@ static void __bch2_btree_flush_all(struct bch_fs *c, unsigned flag)
rcu_read_unlock();
wait_on_bit_io(&b->flags, flag, TASK_UNINTERRUPTIBLE);
goto restart;
}
rcu_read_unlock();
}