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:
commit
ea5acb08fa
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue