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>
(cherry picked from commit aa60541877
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
9eec36e483
commit
dc4884a9fb
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue