mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
bcachefs: fix an rcu usage bug
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
a36d3685bb
commit
69d46f9031
1 changed files with 2 additions and 1 deletions
|
@ -967,6 +967,7 @@ void bch2_write(struct closure *cl)
|
|||
|
||||
struct promote_op {
|
||||
struct closure cl;
|
||||
struct rcu_head rcu;
|
||||
u64 start_time;
|
||||
|
||||
struct rhash_head hash;
|
||||
|
@ -1020,7 +1021,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)
|
||||
|
|
Loading…
Reference in a new issue