code: func (devices *DeviceSet) UnmountDevice(hash, mountPath string) error {
  	logger := logrus.WithField("storage-driver", "devicemapper")
  
  	logger.Debugf("UnmountDevice START(hash=%s)", hash)
  	defer logger.Debugf("UnmountDevice END(hash=%s)", hash)
  
  	info, err := devices.lookupDeviceWithLock(hash)
  	if err != nil {
  		return err
  	}
  
  	info.lock.Lock()
  	defer info.lock.Unlock()
  
  	devices.Lock()
  	defer devices.Unlock()
  
  	logger.Debugf("Unmount(%s)", mountPath)
  	if err := unix.Unmount(mountPath, unix.MNT_DETACH); err != nil {
  		return err
  	}
  	logger.Debug("Unmount done")
  
  	// Remove the mountpoint here. Removing the mountpoint (in newer kernels)
  	// will cause all other instances of this mount in other mount namespaces
  	// to be killed (this is an anti-DoS measure that is necessary for things
  	// like devicemapper). This is necessary to avoid cases where a libdm mount
  	// that is present in another namespace will cause subsequent RemoveDevice
  	// operations to fail. We ignore any errors here because this may fail on
  	// older kernels which don't have
  	// torvalds/linux@8ed936b5671bfb33d89bc60bdcc7cf0470ba52fe applied.
  	if err := os.Remove(mountPath); err != nil {
  		logger.Debugf("error doing a remove on unmounted device %s: %v", mountPath, err)
  	}
  
  	return devices.deactivateDevice(info)
  }
docs: // UnmountDevice unmounts the device and removes it from hash.