summaryrefslogtreecommitdiff
path: root/fs/bcachefs/str_hash.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-02-26 15:39:46 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:35 -0400
commit163e885a0aee99657b3819ead6c3390271ed0980 (patch)
tree6656ed38b87b7d7b27f716d0de2ca62c09faa9fe /fs/bcachefs/str_hash.h
parentac7c51b2180e757feaaabcb84794bcc9912a4edf (diff)
bcachefs: Kill TRANS_RESET_MEM|TRANS_RESET_ITERS
All iterators should be released now with bch2_trans_iter_put(), so TRANS_RESET_ITERS shouldn't be needed anymore, and TRANS_RESET_MEM is always used. Also convert more code to __bch2_trans_do(). 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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/bcachefs/str_hash.h b/fs/bcachefs/str_hash.h
index 0710d0bbe36d..9c9549d0a8f6 100644
--- a/fs/bcachefs/str_hash.h
+++ b/fs/bcachefs/str_hash.h
@@ -163,6 +163,7 @@ bch2_hash_lookup(struct btree_trans *trans,
break;
}
}
+ bch2_trans_iter_put(trans, iter);
return ERR_PTR(ret ?: -ENOENT);
}
@@ -187,6 +188,9 @@ bch2_hash_hole(struct btree_trans *trans,
return iter;
}
+ iter->flags |= BTREE_ITER_KEEP_UNTIL_COMMIT;
+ bch2_trans_iter_put(trans, iter);
+
return ERR_PTR(ret ?: -ENOSPC);
}