diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-12-18 14:43:00 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2018-12-27 11:38:38 -0500 |
commit | beb7eef710af0f6d082e198dfd4c469e7311b06e (patch) | |
tree | 74422047b1b11a65d23288e7f33c1baa2902b84e | |
parent | 5fae50f9315fa73f941c19623c4a4c7fad7f09fa (diff) |
bcachefs: fix an rcu usage bug
-rw-r--r-- | fs/bcachefs/io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/io.c b/fs/bcachefs/io.c index ede1ac1b62d1..64637687bf40 100644 --- a/fs/bcachefs/io.c +++ b/fs/bcachefs/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) |