diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-02-18 14:27:10 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:35 -0400 |
commit | 8b53852d0a80ec4e438205bf8eb3a5a73ee8238c (patch) | |
tree | 32502129e6ea44593c7efddc801e7080a44a5f05 /fs/bcachefs/str_hash.h | |
parent | fdf224003354fb14e20f638e479273c4728dfc0a (diff) |
bcachefs: Make sure we're releasing btree iterators
This wasn't originally required, but this is the model we're moving
towards.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/str_hash.h')
-rw-r--r-- | fs/bcachefs/str_hash.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/bcachefs/str_hash.h b/fs/bcachefs/str_hash.h index cf6ecd963a7b..0710d0bbe36d 100644 --- a/fs/bcachefs/str_hash.h +++ b/fs/bcachefs/str_hash.h @@ -262,10 +262,8 @@ int bch2_hash_set(struct btree_trans *trans, if (!ret) ret = -ENOSPC; out: - if (!IS_ERR_OR_NULL(slot)) - bch2_trans_iter_put(trans, slot); - if (!IS_ERR_OR_NULL(iter)) - bch2_trans_iter_put(trans, iter); + bch2_trans_iter_put(trans, slot); + bch2_trans_iter_put(trans, iter); return ret; found: |