summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/fs-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bcachefs/fs-io.c')
-rw-r--r--fs/bcachefs/fs-io.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c
index 1a06f77101ab..30e5acd2e97c 100644
--- a/fs/bcachefs/fs-io.c
+++ b/fs/bcachefs/fs-io.c
@@ -784,6 +784,8 @@ static void bchfs_read(struct btree_trans *trans, struct btree_iter *iter,
bch2_bkey_buf_init(&sk);
retry:
+ bch2_trans_begin(trans);
+
while (1) {
struct bkey_s_c k;
unsigned bytes, sectors, offset_into_extent;
@@ -2541,6 +2543,8 @@ static long bchfs_fcollapse_finsert(struct bch_inode_info *inode,
struct bpos atomic_end;
unsigned trigger_flags = 0;
+ bch2_trans_begin(&trans);
+
k = insert
? bch2_btree_iter_peek_prev(src)
: bch2_btree_iter_peek(src);