Blame SOURCES/autofs-5.1.7-simplify-mount_subtree-mount-check.patch

beb904
autofs-5.1.7 - simplify mount_subtree() mount check
beb904
beb904
From: Ian Kent <raven@themaw.net>
beb904
beb904
The check of the return from sun_mount() following the possible mount
beb904
of the root offset in mount_subtree() can be simpler.
beb904
beb904
Signed-off-by: Ian Kent <raven@themaw.net>
beb904
---
beb904
 CHANGELOG           |    1 +
beb904
 modules/parse_sun.c |   10 +---------
beb904
 2 files changed, 2 insertions(+), 9 deletions(-)
beb904
beb904
--- autofs-5.1.4.orig/CHANGELOG
beb904
+++ autofs-5.1.4/CHANGELOG
beb904
@@ -12,6 +12,7 @@
beb904
 - remove unused parameter form do_mount_autofs_offset().
beb904
 - refactor umount_multi_triggers().
beb904
 - eliminate clean_stale_multi_triggers().
beb904
+- simplify mount_subtree() mount check.
beb904
 
beb904
 xx/xx/2018 autofs-5.1.5
beb904
 - fix flag file permission.
beb904
--- autofs-5.1.4.orig/modules/parse_sun.c
beb904
+++ autofs-5.1.4/modules/parse_sun.c
beb904
@@ -1205,15 +1205,7 @@ static int mount_subtree(struct autofs_p
beb904
 				free(ro_loc);
beb904
 		}
beb904
 
beb904
-		if (ro && rv == 0) {
beb904
-			ret = mount_multi_triggers(ap, me, mm_root, start, mm_base);
beb904
-			if (ret == -1) {
beb904
-				error(ap->logopt, MODPREFIX
beb904
-					 "failed to mount offset triggers");
beb904
-				cleanup_multi_triggers(ap, me, mm_root, start, mm_base);
beb904
-				return 1;
beb904
-			}
beb904
-		} else if (rv <= 0) {
beb904
+		if ((ro && rv == 0) || rv <= 0) {
beb904
 			ret = mount_multi_triggers(ap, me, mm_root, start, mm_base);
beb904
 			if (ret == -1) {
beb904
 				error(ap->logopt, MODPREFIX