зеркало из https://github.com/microsoft/docker.git
devmapper: Fix MountDevice for non-existing Device
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
This commit is contained in:
Родитель
304e33a2fe
Коммит
693d3f8c6a
|
@ -804,6 +804,9 @@ func (devices *DeviceSet) MountDevice(hash, path string) error {
|
|||
defer devices.Unlock()
|
||||
|
||||
info := devices.Devices[hash]
|
||||
if info == nil {
|
||||
return fmt.Errorf("Unknown device %s", hash)
|
||||
}
|
||||
|
||||
if info.mountCount > 0 {
|
||||
if path != info.mountPath {
|
||||
|
|
Загрузка…
Ссылка в новой задаче