diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-06-02 00:15:07 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:05 -0400 |
commit | bc3f8b25f3a4403d6e8c9067e6f0fc9cf23be6fe (patch) | |
tree | 8313d35a9d67c0dc23763c9844ba2fba4a0403a5 /fs/bcachefs/migrate.c | |
parent | 01254036a326e0663eaeabb2eb3359c04caed2a0 (diff) |
bcachefs: Check for errors from bch2_trans_update()
Upcoming refactoring is going to change bch2_trans_update() to start
returning transaction restarts.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/migrate.c')
-rw-r--r-- | fs/bcachefs/migrate.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/bcachefs/migrate.c b/fs/bcachefs/migrate.c index ef69a19f494a..6ebe49ba2248 100644 --- a/fs/bcachefs/migrate.c +++ b/fs/bcachefs/migrate.c @@ -73,9 +73,8 @@ static int __bch2_dev_usrdata_drop(struct bch_fs *c, unsigned dev_idx, int flags bch2_btree_iter_set_pos(iter, bkey_start_pos(&sk.k->k)); - bch2_trans_update(&trans, iter, sk.k, 0); - - ret = bch2_trans_commit(&trans, NULL, NULL, + ret = bch2_trans_update(&trans, iter, sk.k, 0) ?: + bch2_trans_commit(&trans, NULL, NULL, BTREE_INSERT_NOFAIL); /* |