Merge pull request #9054 from macOScontainers/canonicalize-filter-mount-path
Fix usages of `mountinfo.PrefixFilter`
This commit is contained in:
@@ -164,6 +164,11 @@ func openLogFile(path string) (*os.File, error) {
|
||||
// unmountRecursive unmounts the target and all mounts underneath, starting with
|
||||
// the deepest mount first.
|
||||
func unmountRecursive(ctx context.Context, target string) error {
|
||||
target, err := mount.CanonicalizePath(target)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
toUnmount, err := mountinfo.GetMounts(mountinfo.PrefixFilter(target))
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user