mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
bcachefs: Fix a btree iterator leak
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
87a432f5d7
commit
57447b7acc
@ -1992,7 +1992,7 @@ static void btree_trans_iter_alloc_fail(struct btree_trans *trans)
|
||||
char buf[100];
|
||||
|
||||
trans_for_each_iter(trans, iter)
|
||||
printk(KERN_ERR "iter: btree %s pos %s%s%s%s %ps\n",
|
||||
printk(KERN_ERR "iter: btree %s pos %s%s%s%s %pS\n",
|
||||
bch2_btree_ids[iter->btree_id],
|
||||
(bch2_bpos_to_text(&PBUF(buf), iter->pos), buf),
|
||||
btree_iter_live(trans, iter) ? " live" : "",
|
||||
|
@ -157,8 +157,10 @@ static int bch2_make_extent_indirect(struct btree_trans *trans,
|
||||
bch2_trans_update(trans, reflink_iter, r_v, 0);
|
||||
|
||||
r_p = bch2_trans_kmalloc(trans, sizeof(*r_p));
|
||||
if (IS_ERR(r_p))
|
||||
return PTR_ERR(r_p);
|
||||
if (IS_ERR(r_p)) {
|
||||
ret = PTR_ERR(r_p);
|
||||
goto err;
|
||||
}
|
||||
|
||||
orig->k.type = KEY_TYPE_reflink_p;
|
||||
r_p = bkey_i_to_reflink_p(orig);
|
||||
|
Loading…
Reference in New Issue
Block a user