summaryrefslogtreecommitdiff
path: root/fs/bcachefs/io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-01-05 11:55:23 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:52 +0300
commit0093b9e9704cc932363c66b2b072b762771ffe1f (patch)
tree4f713435e38cd46f11a91bd62c10a7c892098574 /fs/bcachefs/io.c
parent629a21b621c466deac6e7ce20242308091f09735 (diff)
downloadlinux-0093b9e9704cc932363c66b2b072b762771ffe1f.tar.xz
bcachefs: Fix promote path leak
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/io.c')
-rw-r--r--fs/bcachefs/io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/io.c b/fs/bcachefs/io.c
index 93d300812b4b..1436863fe418 100644
--- a/fs/bcachefs/io.c
+++ b/fs/bcachefs/io.c
@@ -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);
}