mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
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:
committed by
mergify[bot]
parent
10b2277330
commit
83df1eae53
@ -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
|
||||
|
Reference in New Issue
Block a user