Merge pull request #8035 from ktock/fixunmount

Make argument validation of `mount.UnmountRecursive` compatible to `mount.UnmountAll`
This commit is contained in:
Phil Estes
2023-02-02 11:55:24 -05:00
committed by GitHub

View File

@@ -27,6 +27,9 @@ import (
// UnmountRecursive unmounts the target and all mounts underneath, starting
// with the deepest mount first.
func UnmountRecursive(target string, flags int) error {
if target == "" {
return nil
}
mounts, err := mountinfo.GetMounts(mountinfo.PrefixFilter(target))
if err != nil {
return err