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

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