bcachefs: Fix promote path leak

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2023-01-05 03:55:23 -05:00
parent 629a21b621
commit 0093b9e970

View file

@ -1924,6 +1924,8 @@ static void promote_free(struct bch_fs *c, struct promote_op *op)
{
int ret;
bch2_data_update_exit(&op->write);
ret = rhashtable_remove_fast(&c->promote_table, &op->hash,
bch_promote_params);
BUG_ON(ret);
@ -1939,8 +1941,6 @@ static void promote_done(struct bch_write_op *wop)
bch2_time_stats_update(&c->times[BCH_TIME_data_promote],
op->start_time);
bch2_data_update_exit(&op->write);
promote_free(c, op);
}