From 3233d8a0c460fc9627963658ac59edc5b6186e72 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Tue, 19 Dec 2023 19:17:19 -0500 Subject: [PATCH] cmd_migrate: fix write_data() passing a parent closure is totally unnecessary when using BCH_WRITE_SYNC - and pops an assert in debug mode, because the write path no longer supports delivering completions that way. Signed-off-by: Kent Overstreet --- cmd_migrate.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cmd_migrate.c b/cmd_migrate.c index 8b2841ab..265ebd79 100644 --- a/cmd_migrate.c +++ b/cmd_migrate.c @@ -251,14 +251,11 @@ static void write_data(struct bch_fs *c, { struct bch_write_op op; struct bio_vec bv[WRITE_DATA_BUF / PAGE_SIZE]; - struct closure cl; BUG_ON(dst_offset & (block_bytes(c) - 1)); BUG_ON(len & (block_bytes(c) - 1)); BUG_ON(len > WRITE_DATA_BUF); - closure_init_stack(&cl); - bio_init(&op.wbio.bio, NULL, bv, ARRAY_SIZE(bv), 0); bch2_bio_map(&op.wbio.bio, buf, len); @@ -274,7 +271,7 @@ static void write_data(struct bch_fs *c, if (ret) die("error reserving space in new filesystem: %s", bch2_err_str(ret)); - closure_call(&op.cl, bch2_write, NULL, &cl); + closure_call(&op.cl, bch2_write, NULL, NULL); dst_inode->bi_sectors += len >> 9; }