mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
libxl: revert 23428:93e17b0cd035 "avoid blktap2 deadlock"
This results in additional leakage in xenstore according to the automated tests. Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
1 parent
303b534f0e
commit
cf5385ec66
2 files changed
+1
-7
No files matched your search
@@ -59,7 +59,6 @@ void libxl__device_destroy_tapdisk(libxl__gc *gc, char *be_path)
|
||||
char *path, *params, *type, *disk;
|
||||
int err;
|
||||
tap_list_t tap;
|
||||
libxl_ctx *ctx = libxl__gc_owner(gc);
|
||||
|
||||
path = libxl__sprintf(gc, "%s/tapdisk-params", be_path);
|
||||
if (!path) return;
|
||||
@@ -76,11 +75,5 @@ void libxl__device_destroy_tapdisk(libxl__gc *gc, char *be_path)
|
||||
err = tap_ctl_find(type, disk, &tap);
|
||||
if (err < 0) return;
|
||||
|
||||
/*
|
||||
* Remove the instance of the backend device to avoid a deadlock with the
|
||||
* removal of the tap device.
|
||||
*/
|
||||
xs_rm(ctx->xsh, XBT_NULL, be_path);
|
||||
|
||||
tap_ctl_destroy(tap.id, tap.minor);
|
||||
}
|
||||
@@ -251,6 +251,7 @@ int libxl__device_destroy(libxl_ctx *ctx, char *be_path, int force)
|
||||
goto out;
|
||||
if (atoi(state) != 4) {
|
||||
libxl__device_destroy_tapdisk(&gc, be_path);
|
||||
xs_rm(ctx->xsh, XBT_NULL, be_path);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||