Skip to content

Commit

Permalink
CA-217921: VBD.unplug must destroy the datapath if a VBD was already …
Browse files Browse the repository at this point in the history
…shut down

The comment on top of the `VBD.unplug` function says:

1. if the device has already been shutdown and deactivated (as in suspend) we
must call DP.destroy here to avoid leaks

However, recent commit d723d4b had regressed this.

Signed-off-by: Rob Hoes <[email protected]>
  • Loading branch information
robhoes committed Aug 12, 2016
1 parent 1c7567d commit 43baf4f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xc/xenops_server_xen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2085,7 +2085,9 @@ module VBD = struct
)
(fun () ->
match domid, backend with
| Some x, Some (VDI _) -> Storage.dp_destroy task (Storage.id_of (string_of_int x) vbd.Vbd.id)
| Some x, None
| Some x, Some (VDI _)
-> Storage.dp_destroy task (Storage.id_of (string_of_int x) vbd.Vbd.id)
| _ -> ()
)
with
Expand Down

0 comments on commit 43baf4f

Please sign in to comment.