diff options
Diffstat (limited to 'fs/bcachefs/io_misc.c')
-rw-r--r-- | fs/bcachefs/io_misc.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/bcachefs/io_misc.c b/fs/bcachefs/io_misc.c index 3f9defd144a4..fa0b06e17d17 100644 --- a/fs/bcachefs/io_misc.c +++ b/fs/bcachefs/io_misc.c @@ -274,13 +274,15 @@ static int __bch2_resume_logged_op_truncate(struct btree_trans *trans, if (ret) goto err; - CLASS(btree_iter, fpunch_iter)(trans, BTREE_ID_extents, - POS(inum.inum, round_up(new_i_size, block_bytes(c)) >> 9), - BTREE_ITER_intent); - ret = bch2_fpunch_at(trans, &fpunch_iter, inum, U64_MAX, i_sectors_delta); + { + CLASS(btree_iter, fpunch_iter)(trans, BTREE_ID_extents, + POS(inum.inum, round_up(new_i_size, block_bytes(c)) >> 9), + BTREE_ITER_intent); + ret = bch2_fpunch_at(trans, &fpunch_iter, inum, U64_MAX, i_sectors_delta); - if (bch2_err_matches(ret, BCH_ERR_transaction_restart)) - ret = 0; + if (bch2_err_matches(ret, BCH_ERR_transaction_restart)) + ret = 0; + } err: if (warn_errors) bch_err_fn(c, ret); |