1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #20854 from inatatsu/reduce-parsing-mountinfo

Eliminate redundant parsing of mountinfo
This commit is contained in:
Alexander Morozov 2016-03-03 19:48:32 -08:00
commit ea5acb08fa

View file

@ -468,7 +468,11 @@ func (a *Driver) unmount(m *data) error {
}
func (a *Driver) mounted(m *data) (bool, error) {
return mountpk.Mounted(m.path)
var buf syscall.Statfs_t
if err := syscall.Statfs(m.path, &buf); err != nil {
return false, nil
}
return graphdriver.FsMagic(buf.Type) == graphdriver.FsMagicAufs, nil
}
// Cleanup aufs and unmount all mountpoints