Skip to content

Commit

Permalink
mount-utils: treat syscall.ENODEV as corrupted mount
Browse files Browse the repository at this point in the history
Kubernetes-commit: 4cec4e74227349b8f9554dae4707529d7deecb3e
  • Loading branch information
dobsonj authored and k8s-publishing-bot committed Jul 17, 2024
1 parent 2e19d95 commit 9983dfa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion mount_helper_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,13 @@ func IsCorruptedMnt(err error) bool {
underlyingError = err
}

return underlyingError == syscall.ENOTCONN || underlyingError == syscall.ESTALE || underlyingError == syscall.EIO || underlyingError == syscall.EACCES || underlyingError == syscall.EHOSTDOWN || underlyingError == syscall.EWOULDBLOCK
return errors.Is(underlyingError, syscall.ENOTCONN) ||
errors.Is(underlyingError, syscall.ESTALE) ||
errors.Is(underlyingError, syscall.EIO) ||
errors.Is(underlyingError, syscall.EACCES) ||
errors.Is(underlyingError, syscall.EHOSTDOWN) ||
errors.Is(underlyingError, syscall.EWOULDBLOCK) ||
errors.Is(underlyingError, syscall.ENODEV)
}

// MountInfo represents a single line in /proc/<pid>/mountinfo.
Expand Down

0 comments on commit 9983dfa

Please sign in to comment.