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