diff options
Diffstat (limited to 'fs/bcachefs/io.c')
-rw-r--r-- | fs/bcachefs/io.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/bcachefs/io.c b/fs/bcachefs/io.c index 1c6dcb705009..84f04e1bdfeb 100644 --- a/fs/bcachefs/io.c +++ b/fs/bcachefs/io.c @@ -266,6 +266,7 @@ int bch2_extent_update(struct btree_trans *trans, { /* this must live until after bch2_trans_commit(): */ struct bkey_inode_buf inode_p; + struct bpos next_pos; bool extending = false, usage_increasing; s64 i_sectors_delta = 0, disk_sectors_delta = 0; int ret; @@ -344,6 +345,8 @@ int bch2_extent_update(struct btree_trans *trans, return ret; } + next_pos = k->k.p; + ret = bch2_trans_update(trans, iter, k, 0) ?: bch2_trans_commit(trans, disk_res, journal_seq, BTREE_INSERT_NOCHECK_RW| @@ -352,6 +355,8 @@ int bch2_extent_update(struct btree_trans *trans, if (ret) return ret; + bch2_btree_iter_set_pos(iter, next_pos); + if (i_sectors_delta_total) *i_sectors_delta_total += i_sectors_delta; return 0; |