Commit 01819cfe authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix btree iterator leak

this fixes an occasonial btree transaction iterators overflow.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 9ae82fe6
...@@ -537,7 +537,9 @@ int bch2_inode_create(struct btree_trans *trans, ...@@ -537,7 +537,9 @@ int bch2_inode_create(struct btree_trans *trans,
inode_u->bi_inum = k.k->p.offset; inode_u->bi_inum = k.k->p.offset;
inode_u->bi_generation = bkey_generation(k); inode_u->bi_generation = bkey_generation(k);
return bch2_inode_write(trans, iter, inode_u); ret = bch2_inode_write(trans, iter, inode_u);
bch2_trans_iter_put(trans, iter);
return ret;
} }
int bch2_inode_rm(struct bch_fs *c, u64 inode_nr) int bch2_inode_rm(struct bch_fs *c, u64 inode_nr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment