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

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