autofs-5.1.6 - remove force parameter from umount_all() From: Ian Kent The function umount_all() is always called with it's force parameter true so remove it. Because the failure case is not used make the function void as well. Signed-off-by: Ian Kent --- CHANGELOG | 1 + daemon/automount.c | 9 +++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 5531a579..3a073e39 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -59,6 +59,7 @@ xx/xx/2020 autofs-5.1.7 - use mnt_list for submounts. - use mnt_list for amdmounts. - make umount_autofs() static. +- remove force parameter from umount_all(). 07/10/2019 autofs-5.1.6 - support strictexpire mount option. diff --git a/daemon/automount.c b/daemon/automount.c index 43640422..0b37fe0d 100644 --- a/daemon/automount.c +++ b/daemon/automount.c @@ -99,7 +99,6 @@ pthread_key_t key_thread_attempt_id = (pthread_key_t) 0L; int aquire_flag_file(void); void release_flag_file(void); -static int umount_all(struct autofs_point *ap, int force); extern struct master *master_list; @@ -711,16 +710,14 @@ int umount_multi(struct autofs_point *ap, const char *path, int incl) return left; } -static int umount_all(struct autofs_point *ap, int force) +static void umount_all(struct autofs_point *ap) { int left; left = umount_multi(ap, ap->path, 0); - if (force && left) + if (left) warn(ap->logopt, "could not unmount %d dirs under %s", left, ap->path); - - return left; } static int umount_autofs(struct autofs_point *ap, const char *root) @@ -738,7 +735,7 @@ static int umount_autofs(struct autofs_point *ap, const char *root) lookup_close_lookup(ap); if (ap->type == LKP_INDIRECT) { - umount_all(ap, 1); + umount_all(ap); ret = umount_autofs_indirect(ap, root); } else ret = umount_autofs_direct(ap);