code: func (daemon *Daemon) cleanupMounts() error {
  	if err := daemon.cleanupMountsByID(""); err != nil {
  		return err
  	}
  
  	info, err := mount.GetMounts(mount.SingleEntryFilter(daemon.root))
  	if err != nil {
  		return errors.Wrap(err, "error reading mount table for cleanup")
  	}
  
  	if len(info) < 1 {
  		// no mount found, we're done here
  		return nil
  	}
  
  	// `info.Root` here is the root mountpoint of the passed in path (`daemon.root`).
  	// The ony cases that need to be cleaned up is when the daemon has performed a
  	//   `mount --bind /daemon/root /daemon/root && mount --make-shared /daemon/root`
  	// This is only done when the daemon is started up and `/daemon/root` is not
  	// already on a shared mountpoint.
  	if !shouldUnmountRoot(daemon.root, info[0]) {
  		return nil
  	}
  
  	unmountFile := getUnmountOnShutdownPath(daemon.configStore)
  	if _, err := os.Stat(unmountFile); err != nil {
  		return nil
  	}
  
  	logrus.WithField("mountpoint", daemon.root).Debug("unmounting daemon root")
  	if err := mount.Unmount(daemon.root); err != nil {
  		return err
  	}
  	return os.Remove(unmountFile)
  }
docs: // cleanupMounts umounts used by container resources and the daemon root mount