Blame SOURCES/autofs-5.1.7-fix-mnts_get_expire_list-expire-list-construction.patch

beb904
autofs-5.1.7 - fix mnts_get_expire_list() expire list construction
beb904
beb904
From: Ian Kent <raven@themaw.net>
beb904
beb904
The mnts_get_expire_list() function is supposed to return an ordered
beb904
list of expire candidates but it is not checking the mounted status
beb904
of list entries and is returning a larger list than is needed.
beb904
beb904
Signed-off-by: Ian Kent <raven@themaw.net>
beb904
---
beb904
 CHANGELOG    |    1 +
beb904
 lib/mounts.c |    3 +++
beb904
 2 files changed, 4 insertions(+)
beb904
beb904
--- autofs-5.1.4.orig/CHANGELOG
beb904
+++ autofs-5.1.4/CHANGELOG
beb904
@@ -13,6 +13,7 @@
beb904
 - refactor umount_multi_triggers().
beb904
 - eliminate clean_stale_multi_triggers().
beb904
 - simplify mount_subtree() mount check.
beb904
+- fix mnts_get_expire_list() expire list construction.
beb904
 
beb904
 xx/xx/2018 autofs-5.1.5
beb904
 - fix flag file permission.
beb904
--- autofs-5.1.4.orig/lib/mounts.c
beb904
+++ autofs-5.1.4/lib/mounts.c
beb904
@@ -1364,6 +1364,9 @@ void mnts_get_expire_list(struct list_he
beb904
 	list_for_each_entry(mnt, &ap->mounts, mount) {
beb904
 		struct node *n;
beb904
 
beb904
+		if (!(mnt->flags & MNTS_MOUNTED))
beb904
+			continue;
beb904
+
beb904
 		__mnts_get_mount(mnt);
beb904
 
beb904
 		if (!tree) {