mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-04 04:06:26 +00:00
bcachefs: fix bch2_hash_delete() error path
we were exiting an iterator that hadn't been initialized Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
74ec2f3024
commit
94bdeec8f5
@ -363,8 +363,11 @@ int bch2_hash_delete(struct btree_trans *trans,
|
||||
struct btree_iter iter;
|
||||
struct bkey_s_c k = bch2_hash_lookup(trans, &iter, desc, info, inum, key,
|
||||
BTREE_ITER_intent);
|
||||
int ret = bkey_err(k) ?:
|
||||
bch2_hash_delete_at(trans, desc, info, &iter, 0);
|
||||
int ret = bkey_err(k);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = bch2_hash_delete_at(trans, desc, info, &iter, 0);
|
||||
bch2_trans_iter_exit(trans, &iter);
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user