Commit 0093b9e9 authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Fix promote path leak

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 629a21b6
...@@ -1924,6 +1924,8 @@ static void promote_free(struct bch_fs *c, struct promote_op *op) ...@@ -1924,6 +1924,8 @@ static void promote_free(struct bch_fs *c, struct promote_op *op)
{ {
int ret; int ret;
bch2_data_update_exit(&op->write);
ret = rhashtable_remove_fast(&c->promote_table, &op->hash, ret = rhashtable_remove_fast(&c->promote_table, &op->hash,
bch_promote_params); bch_promote_params);
BUG_ON(ret); BUG_ON(ret);
...@@ -1939,8 +1941,6 @@ static void promote_done(struct bch_write_op *wop) ...@@ -1939,8 +1941,6 @@ static void promote_done(struct bch_write_op *wop)
bch2_time_stats_update(&c->times[BCH_TIME_data_promote], bch2_time_stats_update(&c->times[BCH_TIME_data_promote],
op->start_time); op->start_time);
bch2_data_update_exit(&op->write);
promote_free(c, op); promote_free(c, op);
} }
......
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