Change:
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!--What happened: There's , and . The former is used by local and nfs volume plugins, while the latter is used by , which is also used by local and nfs volume plugins. What you expected to happen: Can we consolidate these? This is really confusing and could easily be the source of bugs. <!-- DO NOT EDIT BELOW THIS LINE --/kind cleanup
cc
/assign I'd like to clean up code.

Discussion:
} func (mounter *execMounter) IsNotMountPoint(dir string) (bool, error) { <del> return IsNotMountPoint(mounter, dir) </del> <ins> return isNotMountPoint(mounter, dir) </ins> } func (mounter *execMounter) IsLikelyNotMountPoint(file string) (bool, error) {

} func (f *FakeMounter) IsNotMountPoint(dir string) (bool, error) { <del> return IsNotMountPoint(f, dir) </del> <ins> return isNotMountPoint(f, dir) </ins> } func (f *FakeMounter) IsLikelyNotMountPoint(file string) (bool, error) {

return device, refCount, nil } <del> // IsNotMountPoint determines if a directory is a mountpoint. // It should return ErrNotExist when the directory does not exist. // This method uses the List() of all mountpoints // It is more extensive than IsLikelyNotMountPoint // and it detects bind mounts in linux func IsNotMountPoint(mounter Interface, file string) (bool, error) { </del> <ins> // isNotMountPoint implements Mounter.IsNotMountPoint and is shared by mounter // implementations. func isNotMountPoint(mounter Interface, file string) (bool, error) { </ins> // IsLikelyNotMountPoint provides a quick check // to determine whether file IS A mountpoint notMnt, notMntErr := mounter.IsLikelyNotMountPoint(file)

var notMnt bool var err error if extensiveMountPointCheck { <del> notMnt, err = IsNotMountPoint(mounter, mountPath) </del> <ins> notMnt, err = mounter.IsNotMountPoint(mountPath) </ins> } else { notMnt, err = mounter.IsLikelyNotMountPoint(mountPath) }

} func (mounter *Mounter) IsNotMountPoint(dir string) (bool, error) { <del> return IsNotMountPoint(mounter, dir) </del> <ins> return isNotMountPoint(mounter, dir) </ins> } // IsLikelyNotMountPoint determines if a directory is not a mountpoint.

func prepareSubpathTarget(mounter Interface, subpath Subpath) (bool, string, error) { // Early check for already bind-mounted subpath. bindPathTarget := getSubpathBindTarget(subpath) <del> notMount, err := IsNotMountPoint(mounter, bindPathTarget) </del> <ins> notMount, err := mounter.IsNotMountPoint(bindPathTarget) </ins> if err != nil { if !os.IsNotExist(err) { return false, "", fmt.Errorf("error checking path %s for mount: %s", bindPathTarget, err)

} func (mounter *Mounter) IsNotMountPoint(dir string) (bool, error) { <del> return IsNotMountPoint(mounter, dir) </del> <ins> return isNotMountPoint(mounter, dir) </ins> } func (mounter *Mounter) IsLikelyNotMountPoint(file string) (bool, error) {

// IsNotMountPoint determines if a directory is a mountpoint. func (mounter *Mounter) IsNotMountPoint(dir string) (bool, error) { <del> return IsNotMountPoint(mounter, dir) </del> <ins> return isNotMountPoint(mounter, dir) </ins> } // IsLikelyNotMountPoint determines if a directory is not a mountpoint.

} func (m *NsenterMounter) IsNotMountPoint(dir string) (bool, error) { <del> return IsNotMountPoint(m, dir) </del> <ins> return isNotMountPoint(m, dir) </ins> } func (*NsenterMounter) IsMountPointMatch(mp MountPoint, dir string) bool {