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

pkg/mount: MakeMount: minor optimization

Current code in MakeMount parses /proc/self/mountinfo twice:
first in call to Mounted(), then in call to Mount(). Use
ForceMount() to eliminate such double parsing.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin 2019-04-08 20:53:38 -07:00
parent ed68d3ab72
commit aa60541877

View file

@ -59,7 +59,7 @@ func MakeMount(mnt string) error {
return nil
}
return Mount(mnt, mnt, "none", "bind")
return ForceMount(mnt, mnt, "none", "bind")
}
func ensureMountedAs(mountPoint, options string) error {