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

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