bcachefs: bch2_data_update_index_update() -> bch2_trans_run()
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 26 Feb 2023 22:12:05 +0000 (17:12 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:54 +0000 (17:09 -0400)
Convert to use the standard helper

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/data_update.c

index dacea5e040003a142f06bcbcac261a825ee7ca34..84c2963d4069a081d14bba2904f1d93a8cfcb929 100644 (file)
@@ -296,15 +296,7 @@ out:
 
 int bch2_data_update_index_update(struct bch_write_op *op)
 {
-       struct bch_fs *c = op->c;
-       struct btree_trans trans;
-       int ret;
-
-       bch2_trans_init(&trans, c, BTREE_ITER_MAX, 1024);
-       ret = __bch2_data_update_index_update(&trans, op);
-       bch2_trans_exit(&trans);
-
-       return ret;
+       return bch2_trans_run(op->c, __bch2_data_update_index_update(&trans, op));
 }
 
 void bch2_data_update_read_done(struct data_update *m,