On 2019/8/14 上午9:03, Jeff Mahoney wrote: > When btrfs_add_to_fsid fails in mkfs we try to close the ctree. That > complains that we already have a transaction open. We should be taking > the error path and exit cleanly without writing. > > Signed-off-by: Jeff Mahoney Reviewed-by: Qu Wenruo Thanks, Qu > --- > mkfs/main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mkfs/main.c b/mkfs/main.c > index 971cb395..b752da13 100644 > --- a/mkfs/main.c > +++ b/mkfs/main.c > @@ -1268,7 +1268,7 @@ int BOX_MAIN(mkfs)(int argc, char **argv) > sectorsize, sectorsize, sectorsize); > if (ret) { > error("unable to add %s to filesystem: %d", file, ret); > - goto out; > + goto error; > } > if (verbose >= 2) { > struct btrfs_device *device; >