autofs-5.1.9 - fix indirect expire's count of remaining mounts

From: Ian Kent <raven@themaw.net>

The indirect mount expire procedure can calculate remaining mounts
incorrectly for the different mount types. In particular it can count
an offset mount as a normal mount.

Signed-off-by: Ian Kent <raven@themaw.net>
---
 CHANGELOG         |    1 +
 daemon/indirect.c |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 6b39bcd22..d397d4c51 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -63,6 +63,7 @@
 - fix locking when setting master map reading.
 - eliminate master map parameter where possible.
 - refactor umount_subtree_mounts().
+- fix indirect expire's count of remaining mounts.
 
 02/11/2023 autofs-5.1.9
 - fix kernel mount status notification.
diff --git a/daemon/indirect.c b/daemon/indirect.c
index 481f802e0..cf8f2934e 100644
--- a/daemon/indirect.c
+++ b/daemon/indirect.c
@@ -518,9 +518,9 @@ void *expire_proc_indirect(void *arg)
 	pthread_cleanup_push(mnts_cleanup, &mnts);
 	/* Are there any real mounts left */
 	list_for_each_entry(mnt, &mnts, expire) {
-		if (!(mnt->flags & MNTS_AUTOFS))
+		if (!(mnt->flags & (MNTS_AUTOFS|MNTS_OFFSET))) {
 			count++;
-		else {
+		} else {
 			if (mnt->flags & MNTS_INDIRECT)
 				submnts++;
 			else
