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

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