Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 130701790bf2d95e902edf16031ff596 > files > 184

autofs-5.0.1-0.rc2.164.el5_8.src.rpm

diff --git a/CHANGELOG b/CHANGELOG
index f8618ce..c98f14e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,7 @@
 -------------------------
 - fix handling of autofs specific mount options.
 - fix include check full patch for file map of same name.
+- fix cache entrys not being cleaned up on submount expire.
 
 1/9/2006 autofs-5.0.1 rc2
 -------------------------
diff --git a/modules/parse_sun.c b/modules/parse_sun.c
index 4606577..ed374ec 100644
--- a/modules/parse_sun.c
+++ b/modules/parse_sun.c
@@ -1017,6 +1017,17 @@ int parse_mount(struct autofs_point *ap,
 				free(options);
 				return 1;
 			}
+		} else {
+			/*
+			 * If the entry exists it must not have any existing
+			 * multi-mount subordinate entries since we are
+			 * mounting this afresh. We need to do this to allow
+			 * us to fail on the check for duplicate offsets in
+			 * we don't know when submounts go away.
+			 */
+			cache_multi_lock(me);
+			cache_delete_offset_list(mc, name);
+			cache_multi_unlock(me);
 		}
 		cache_unlock(mc);