summaryrefslogtreecommitdiff
path: root/libbcachefs/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbcachefs/io.c')
-rw-r--r--libbcachefs/io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libbcachefs/io.c b/libbcachefs/io.c
index ede1ac1b..64637687 100644
--- a/libbcachefs/io.c
+++ b/libbcachefs/io.c
@@ -946,6 +946,7 @@ void bch2_write(struct closure *cl)
struct promote_op {
struct closure cl;
+ struct rcu_head rcu;
u64 start_time;
struct rhash_head hash;
@@ -999,7 +1000,7 @@ static void promote_free(struct bch_fs *c, struct promote_op *op)
bch_promote_params);
BUG_ON(ret);
percpu_ref_put(&c->writes);
- kfree(op);
+ kfree_rcu(op, rcu);
}
static void promote_done(struct closure *cl)