core/mount: pass "-c" flag to /bin/umount (#6093)
"-c", which is short for "--no-canonicalize", tells /bin/umount that the path name is canonical (no .. or symlinks etc). systemd always uses a canonical name, so this flag is appropriate for systemd to use. Knowing that the path is canonical allows umount to avoid some calls to lstat() on the path. From v2.30 "-c" goes further and causes umount to avoid all attempts to 'lstat()' (or similar) the path. This is important when automatically unmounting a filesystem, as lstat() can hang indefinitely in some cases such as when an NFS server is not accessible. "-c" has been supported since util-linux 2.17 which is before the earliest version supported by systemd. So "-c" is safe to use now, and once util-linux v2.30 is in use, it will allow mounts from non-responsive NFS servers to be unmounted.
Loading