Blame SOURCES/autofs-5.1.7-fix-return-from-umount_subtree_mounts-on-offset-list-delete.patch

beb904
autofs-5.1.7 - fix return from umount_subtree_mounts() on offset list delete
beb904
beb904
From: Ian Kent <raven@themaw.net>
beb904
beb904
When there are no mounts left in a subtree of offset mounts the offset
beb904
list is deleted. If all goes well deleting the list this shouldn't cause
beb904
a positive return from umount_subtree_mounts() (essentially saying not
beb904
the umount of the subtree has not succeeded).
beb904
beb904
Signed-off-by: Ian Kent <raven@themaw.net>
beb904
---
beb904
 CHANGELOG          |    1 +
beb904
 daemon/automount.c |    5 +++--
beb904
 2 files changed, 4 insertions(+), 2 deletions(-)
beb904
beb904
--- autofs-5.1.4.orig/CHANGELOG
beb904
+++ autofs-5.1.4/CHANGELOG
beb904
@@ -15,6 +15,7 @@
beb904
 - simplify mount_subtree() mount check.
beb904
 - fix mnts_get_expire_list() expire list construction.
beb904
 - fix inconsistent locking in umount_subtree_mounts().
beb904
+- fix return from umount_subtree_mounts() on offset list delete.
beb904
 
beb904
 xx/xx/2018 autofs-5.1.5
beb904
 - fix flag file permission.
beb904
--- autofs-5.1.4.orig/daemon/automount.c
beb904
+++ autofs-5.1.4/daemon/automount.c
beb904
@@ -590,9 +590,10 @@ static int umount_subtree_mounts(struct
beb904
 
beb904
 		if (!left && is_mm_root) {
beb904
 			status = cache_delete_offset_list(mc, me->key);
beb904
-			if (status != CHE_OK)
beb904
+			if (status != CHE_OK) {
beb904
 				warn(ap->logopt, "couldn't delete offset list");
beb904
-			left++;
beb904
+				left++;
beb904
+			}
beb904
 		}
beb904
 
beb904
 		if (ap->entry->maps &&