diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-03-19 20:29:11 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:56 -0400 |
commit | 50dc0f692a0dbe3e6a95d3f8e5c7e718bc9f021d (patch) | |
tree | 5d0dcdb49c81ebd54e59c4c9cc1f379994262a48 /fs/bcachefs/dirent.c | |
parent | 8d956c2fb8f7e91370fea1d27d16c6869b8ada78 (diff) | |
download | linux-50dc0f692a0dbe3e6a95d3f8e5c7e718bc9f021d.tar.gz linux-50dc0f692a0dbe3e6a95d3f8e5c7e718bc9f021d.tar.bz2 linux-50dc0f692a0dbe3e6a95d3f8e5c7e718bc9f021d.zip |
bcachefs: Require all btree iterators to be freed
We keep running into occasional bugs with btree transaction iterators
overflowing - this will make those bugs more visible.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/dirent.c')
-rw-r--r-- | fs/bcachefs/dirent.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/bcachefs/dirent.c b/fs/bcachefs/dirent.c index b0625176ab35..592dd80cf963 100644 --- a/fs/bcachefs/dirent.c +++ b/fs/bcachefs/dirent.c @@ -321,6 +321,7 @@ u64 bch2_dirent_lookup(struct bch_fs *c, u64 dir_inum, k = bch2_btree_iter_peek_slot(iter); inum = le64_to_cpu(bkey_s_c_to_dirent(k).v->d_inum); + bch2_trans_iter_put(&trans, iter); out: bch2_trans_exit(&trans); return inum; @@ -379,6 +380,8 @@ int bch2_readdir(struct bch_fs *c, u64 inum, struct dir_context *ctx) break; ctx->pos = dirent.k->p.offset + 1; } + bch2_trans_iter_put(&trans, iter); + ret = bch2_trans_exit(&trans) ?: ret; return ret; |