Blame SOURCES/autofs-5.0.8-dont-ignore-null-cache-entries-on-multi-mount-umount.patch

6bbd11
autofs-5.0.8 - dont ignore null cache entries on multi mount umount
6bbd11
6bbd11
From: Ian Kent <raven@themaw.net>
6bbd11
6bbd11
When umounting the offsets of a multi-mount negative cache entries
6bbd11
shouldn't be ignored. Even if the mount they correspond to failed to
6bbd11
mount the trigger still needs to be umounted.
6bbd11
6bbd11
Not ignoring negative entries when cleaning stale multi-mount entries
6bbd11
isn't obviously the right thing to do but, since the multi-mount entry
6bbd11
should have been refreshed, there shouldn't be any valid negative entries
6bbd11
so they must be stale and need to go.
6bbd11
---
6bbd11
 CHANGELOG    |    1 +
6bbd11
 lib/mounts.c |    4 ++--
6bbd11
 2 files changed, 3 insertions(+), 2 deletions(-)
6bbd11
6bbd11
--- autofs-5.0.7.orig/CHANGELOG
6bbd11
+++ autofs-5.0.7/CHANGELOG
6bbd11
@@ -97,6 +97,7 @@
6bbd11
 - fix map source with type lookup.
6bbd11
 - fix fix map source with type lookup.
6bbd11
 - fix lookup_nss_mount() map lookup.
6bbd11
+- dont ignore null cache entries on multi mount umount.
6bbd11
 
6bbd11
 25/07/2012 autofs-5.0.7
6bbd11
 =======================
6bbd11
--- autofs-5.0.7.orig/lib/mounts.c
6bbd11
+++ autofs-5.0.7/lib/mounts.c
6bbd11
@@ -1804,7 +1804,7 @@ int umount_multi_triggers(struct autofs_
6bbd11
 
6bbd11
 		oe = cache_lookup_offset(mm_base, offset, start, &me->multi_list);
6bbd11
 		/* root offset is a special case */
6bbd11
-		if (!oe || !oe->mapent || (strlen(oe->key) - start) == 1)
6bbd11
+		if (!oe || (strlen(oe->key) - start) == 1)
6bbd11
 			continue;
6bbd11
 
6bbd11
 		/*
6bbd11
@@ -1926,7 +1926,7 @@ int clean_stale_multi_triggers(struct au
6bbd11
 
6bbd11
 		oe = cache_lookup_offset(mm_base, offset, start, &me->multi_list);
6bbd11
 		/* root offset is a special case */
6bbd11
-		if (!oe || !oe->mapent || (strlen(oe->key) - start) == 1)
6bbd11
+		if (!oe || (strlen(oe->key) - start) == 1)
6bbd11
 			continue;
6bbd11
 
6bbd11
 		/* Check for and umount stale subtree offsets */