diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-12-18 14:43:00 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2019-04-03 12:44:01 -0400 |
commit | 3dc89bdaa3e42c82234363d684f3e79d552ccfb0 (patch) | |
tree | 78936c392891718aed6f0b9506c624290f78fa5f | |
parent | 853eacca8976a4b521e9e18b2d95bea37835e920 (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) |