Blame SOURCES/autofs-5.1.6-remove-force-parameter-from-umount_all.patch

49b67f
autofs-5.1.6 - remove force parameter from umount_all()
49b67f
49b67f
From: Ian Kent <raven@themaw.net>
49b67f
49b67f
The function umount_all() is always called with it's force parameter
49b67f
true so remove it.
49b67f
49b67f
Because the failure case is not used make the function void as well.
49b67f
49b67f
Signed-off-by: Ian Kent <raven@themaw.net>
49b67f
---
49b67f
 CHANGELOG          |    1 +
49b67f
 daemon/automount.c |    9 +++------
49b67f
 2 files changed, 4 insertions(+), 6 deletions(-)
49b67f
49b67f
--- autofs-5.1.4.orig/CHANGELOG
49b67f
+++ autofs-5.1.4/CHANGELOG
49b67f
@@ -125,6 +125,7 @@ xx/xx/2018 autofs-5.1.5
49b67f
 - use mnt_list for submounts.
49b67f
 - use mnt_list for amdmounts.
49b67f
 - make umount_autofs() static.
49b67f
+- remove force parameter from umount_all().
49b67f
 
49b67f
 19/12/2017 autofs-5.1.4
49b67f
 - fix spec file url.
49b67f
--- autofs-5.1.4.orig/daemon/automount.c
49b67f
+++ autofs-5.1.4/daemon/automount.c
49b67f
@@ -99,7 +99,6 @@ pthread_key_t key_thread_attempt_id = (p
49b67f
 
49b67f
 int aquire_flag_file(void);
49b67f
 void release_flag_file(void);
49b67f
-static int umount_all(struct autofs_point *ap, int force);
49b67f
 
49b67f
 extern struct master *master_list;
49b67f
 
49b67f
@@ -710,16 +709,14 @@ int umount_multi(struct autofs_point *ap
49b67f
 	return left;
49b67f
 }
49b67f
 
49b67f
-static int umount_all(struct autofs_point *ap, int force)
49b67f
+static void umount_all(struct autofs_point *ap)
49b67f
 {
49b67f
 	int left;
49b67f
 
49b67f
 	left = umount_multi(ap, ap->path, 0);
49b67f
-	if (force && left)
49b67f
+	if (left)
49b67f
 		warn(ap->logopt, "could not unmount %d dirs under %s",
49b67f
 		     left, ap->path);
49b67f
-
49b67f
-	return left;
49b67f
 }
49b67f
 
49b67f
 static int umount_autofs(struct autofs_point *ap, const char *root)
49b67f
@@ -737,7 +734,7 @@ static int umount_autofs(struct autofs_p
49b67f
 	lookup_close_lookup(ap);
49b67f
 
49b67f
 	if (ap->type == LKP_INDIRECT) {
49b67f
-		umount_all(ap, 1);
49b67f
+		umount_all(ap);
49b67f
 		ret = umount_autofs_indirect(ap, root);
49b67f
 	} else
49b67f
 		ret = umount_autofs_direct(ap);