Add checks in DiskInfo() to protect against changing mounts (#8286)

This commit is contained in:
Harshavardhana 2019-09-23 15:16:55 -07:00 committed by GitHub
parent cb7d23cb17
commit 975134e42b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -329,6 +329,10 @@ func (s *posix) DiskInfo() (info DiskInfo, err error) {
return info, errFaultyDisk
}
if err := s.checkDiskFound(); err != nil {
return info, err
}
di, err := getDiskInfo(s.diskPath)
if err != nil {
return info, err