|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 8/8] libxl__device_disk_local_attach: wait for state "connected"
Stefano Stabellini writes ("[Xen-devel] [PATCH v4 8/8]
libxl__device_disk_local_attach: wait for state "connected""):
> In order to make sure that the block device is available and ready to be
> used, wait for state "connected" in the backend before returning.
...
> Changes in v4:
> - improve exit paths.
...
> + if (tmpdisk->vdev != NULL) {
> + rc = libxl__device_from_disk(gc, 0, tmpdisk, &device);
> + if (rc < 0)
> + goto out_wait_err;
This still seems to have two error exit paths:
> out:
> if (t != XBT_NULL)
> xs_transaction_end(ctx->xsh, t, 1);
> return dev;
> + out_wait_err:
> + libxl__device_disk_local_detach(gc, tmpdisk);
> + return NULL;
Previously "out" was both a success and error exit path AFAICT.
I really don't care very much whether you want to combine the success
and error exit paths. But there should be only one error exit path.
So please no "goto out_<some particular thing>_err".
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |