SIGN IN SIGN UP

Mark device ID free only if device actually got deleted

Right now if somebody has enabled deferred device deletion, then
deleteTransaction() returns success even if device could not be deleted. It
has been marked for deferred deletion. Right now we will mark device ID free
and potentially use it again when somebody tries to create new container. And
that's wrong. Device ID is not free yet. It will become free once devices
has actually been deleted by the goroutine later.

So move the location of call to markDeviceIDFree() to a place where we know
device actually got deleted and was not marked for deferred deletion.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
V
Vivek Goyal committed
2dccb562dff79fef0f7a1d3b5f0e760e9d799d44
Parent: 2d5ca74
Committed by root <root@vm4-f23.localdomain> on 1/11/2016, 6:57:37 PM