|
|
9a499a |
autofs-5.1.6 - fix remount expire
|
|
|
9a499a |
|
|
|
9a499a |
From: Ian Kent <raven@themaw.net>
|
|
|
9a499a |
|
|
|
9a499a |
When starting autofs when there are active mounts due to in use
|
|
|
9a499a |
mounts from a previous shutdown, and a mount entry has offsets,
|
|
|
9a499a |
and an offset doesn't have a real mount due to a non-strict fail
|
|
|
9a499a |
returning success for the remount a file handle is incorrectly
|
|
|
9a499a |
left open.
|
|
|
9a499a |
|
|
|
9a499a |
The file handle gets assingned to the offset entry for expires
|
|
|
9a499a |
but since there is no mount to expire it never gets closed which
|
|
|
9a499a |
prevents the multi-mount owner itself from expiring.
|
|
|
9a499a |
|
|
|
9a499a |
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
|
9a499a |
---
|
|
|
9a499a |
CHANGELOG | 1 +
|
|
|
9a499a |
lib/mounts.c | 8 +++++++-
|
|
|
9a499a |
2 files changed, 8 insertions(+), 1 deletion(-)
|
|
|
9a499a |
|
|
|
9a499a |
--- autofs-5.1.4.orig/CHANGELOG
|
|
|
9a499a |
+++ autofs-5.1.4/CHANGELOG
|
|
|
9a499a |
@@ -126,6 +126,7 @@ xx/xx/2018 autofs-5.1.5
|
|
|
9a499a |
- use mnt_list for amdmounts.
|
|
|
9a499a |
- make umount_autofs() static.
|
|
|
9a499a |
- remove force parameter from umount_all().
|
|
|
9a499a |
+- fix remount expire.
|
|
|
9a499a |
|
|
|
9a499a |
19/12/2017 autofs-5.1.4
|
|
|
9a499a |
- fix spec file url.
|
|
|
9a499a |
--- autofs-5.1.4.orig/lib/mounts.c
|
|
|
9a499a |
+++ autofs-5.1.4/lib/mounts.c
|
|
|
9a499a |
@@ -2205,8 +2205,14 @@ int try_remount(struct autofs_point *ap,
|
|
|
9a499a |
if (fd != -1) {
|
|
|
9a499a |
if (type == t_indirect)
|
|
|
9a499a |
ap->ioctlfd = fd;
|
|
|
9a499a |
- else
|
|
|
9a499a |
+ else {
|
|
|
9a499a |
+ if (type == t_offset &&
|
|
|
9a499a |
+ !is_mounted(me->key, MNTS_REAL)) {
|
|
|
9a499a |
+ ops->close(ap->logopt, fd);
|
|
|
9a499a |
+ fd = -1;
|
|
|
9a499a |
+ }
|
|
|
9a499a |
me->ioctlfd = fd;
|
|
|
9a499a |
+ }
|
|
|
9a499a |
return 1;
|
|
|
9a499a |
}
|
|
|
9a499a |
|