'Mark an attachment as no longer in use, and unmount its mountpoint
if necessary.
:param vol_name: The name of the volume on the remote filesystem.
:param mountpoint: The directory where the filesystem is be
mounted on the local compute host.
:param instance: The instance the volume was attached to.'

def umount(self, vol_name, mountpoint, instance):

    LOG.debug('_HostMountState.umount(vol_name=%(vol_name)s,    mountpoint=%(mountpoint)s)    generation    %(gen)s', {'vol_name': vol_name, 'mountpoint': mountpoint, 'gen': self.generation})
    with self._get_locked(mountpoint) as mount:
        try:
            mount.remove_attachment(vol_name, instance.uuid)
        except KeyError:
            LOG.warning("Request    to    remove    attachment    (%(vol_name)s,    %(instance)s)    from    %(mountpoint)s,    but    we    don't    think    it's    in    use.", {'vol_name': vol_name, 'instance': instance.uuid, 'mountpoint': mountpoint})
        if (not mount.in_use()):
            mounted = os.path.ismount(mountpoint)
            if mounted:
                mounted = self._real_umount(mountpoint)
            if (not mounted):
                del self.mountpoints[mountpoint]
        LOG.debug('_HostMountState.umount()    for    %(mountpoint)s    generation    %(gen)s    completed    successfully', {'mountpoint': mountpoint, 'gen': self.generation})
