rebase: k8s.io/mount-utils/IsNotMountPoint() is deprecated

IsNotMountPoint() is deprecated and Mounter.IsMountPoint() is
recommended to be used instead.

Reported-by: golangci/staticcheck
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos
2022-08-02 09:50:18 +02:00
committed by mergify[bot]
parent 10b2277330
commit 83df1eae53
2 changed files with 8 additions and 8 deletions

View File

@ -554,12 +554,12 @@ func checkValidImageFeatures(imageFeatures string, ok bool) bool {
// isNotMountPoint checks whether MountPoint does not exists and
// also discards error indicating mountPoint exists.
func isNotMountPoint(mounter mount.Interface, stagingTargetPath string) (bool, error) {
isNotMnt, err := mount.IsNotMountPoint(mounter, stagingTargetPath)
isMnt, err := mounter.IsMountPoint(stagingTargetPath)
if os.IsNotExist(err) {
err = nil
}
return isNotMnt, err
return !isMnt, err
}
// isCephMgrSupported determines if the cluster has support for MGR based operation