diff --git a/pkg/util/mount/mount.go b/pkg/util/mount/mount.go index 96dc68c9a03..a2b89c8dcc0 100644 --- a/pkg/util/mount/mount.go +++ b/pkg/util/mount/mount.go @@ -313,13 +313,12 @@ func checkForNetDev(options []string) bool { // Plan to work on better approach to solve this issue. func HasMountRefs(mountPath string, mountRefs []string) bool { - count := 0 for _, ref := range mountRefs { if !strings.Contains(ref, mountPath) { - count = count + 1 + return true } } - return count > 0 + return false } // PathWithinBase checks if give path is within given base directory.