devmapper: Use a common delete function for all device deletion operation
Right now setupBaseImage() uses deleteDevice() to delete uninitialized base image while rest of the code uses DeleteDevice(). Change it and use a common function everywhere for the sake of uniformity. I can't see what harm can be done by doing little extra locking done by DeleteDevice(). Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
parent
f078bcd8e5
commit
359a38b26a
1 changed files with 1 additions and 1 deletions
|
@ -516,7 +516,7 @@ func (devices *DeviceSet) setupBaseImage() error {
|
|||
|
||||
if oldInfo != nil && !oldInfo.Initialized {
|
||||
log.Debugf("Removing uninitialized base image")
|
||||
if err := devices.deleteDevice(oldInfo); err != nil {
|
||||
if err := devices.DeleteDevice(""); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue