Blame SOURCES/autofs-5.1.0-beta1-fix-expire-when-server-not-responding.patch

6bbd11
autofs-5.1.0-beta1 - fix expire when server not responding
6bbd11
6bbd11
From: Ian Kent <ikent@redhat.com>
6bbd11
6bbd11
The change to handle expire of symlinks relies on doing a stat(2)
6bbd11
call to check if the path to be expired is a symlink.
6bbd11
6bbd11
But system calls that invoke a path walk on real mounts need to be
6bbd11
avoided during expire because if the server isn't responding they
6bbd11
will hang.
6bbd11
---
6bbd11
 CHANGELOG          |    1 +
6bbd11
 daemon/automount.c |    7 ++++++-
6bbd11
 2 files changed, 7 insertions(+), 1 deletion(-)
6bbd11
6bbd11
--- autofs-5.0.7.orig/CHANGELOG
6bbd11
+++ autofs-5.0.7/CHANGELOG
6bbd11
@@ -117,6 +117,7 @@
6bbd11
 - fix incorrect max key length in defaults get_hash().
6bbd11
 - fix xfn sets incorrect lexer state.
6bbd11
 - fix old style key lookup.
6bbd11
+- fix expire when server not responding.
6bbd11
 
6bbd11
 25/07/2012 autofs-5.0.7
6bbd11
 =======================
6bbd11
--- autofs-5.0.7.orig/daemon/automount.c
6bbd11
+++ autofs-5.0.7/daemon/automount.c
6bbd11
@@ -573,9 +573,13 @@ int umount_multi(struct autofs_point *ap
6bbd11
 
6bbd11
 	debug(ap->logopt, "path %s incl %d", path, incl);
6bbd11
 
6bbd11
+	/* If path is a mount it can't be a symlink */
6bbd11
+	if (is_mounted(_PATH_MOUNTED, path, MNTS_ALL))
6bbd11
+		goto real_mount;
6bbd11
+
6bbd11
 	if (lstat(path, &st)) {
6bbd11
 		warn(ap->logopt,
6bbd11
-		     "failed to stat mount point directory %s", path);
6bbd11
+		     "failed to stat directory or symlink %s", path);
6bbd11
 		return 1;
6bbd11
 	}
6bbd11
 
6bbd11
@@ -617,6 +621,7 @@ int umount_multi(struct autofs_point *ap
6bbd11
 		return 0;
6bbd11
 	}
6bbd11
 
6bbd11
+real_mount:
6bbd11
 	is_autofs_fs = 0;
6bbd11
 	if (master_find_submount(ap, path))
6bbd11
 		is_autofs_fs = 1;