mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-04 04:31:28 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user