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

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