This MR adds fixes for several Jiras. - RHEL-57466 - autofs crashes on startup after IDM client configuration We have had several different reports caused by this bug which leads to a SEGV with very little information about the cuase. - Resolves: RHEL-57466 - RHEL-69485 - Sporadic mount failures with amd program maps on RHEL8. This bug causes AMD-style program map mounts to sporadically not work. - Resolves: RHEL-69485 - RHEL-71359 - RFE: autofs: add handling for AMD 'nounmount' option This Jira adds support for a map option that was deferred in the original implementtion. One of our customers needs this so it has been implemented. - Resolves: RHEL-71359 Signed-off-by: Ian Kent <ikent@redhat.com>
54 lines
1.4 KiB
Diff
54 lines
1.4 KiB
Diff
autofs-5.1.9 - don't free ext mount if mounted
|
|
|
|
From: Ian Kent <raven@themaw.net>
|
|
|
|
If an external mount is in use when a umount is attempted don't free
|
|
it just let the reference count go to zero.
|
|
|
|
This will leave the mount in place and it won't get umounted. But if
|
|
another automount uses it it's reference count will become no zero
|
|
allowing for it to be umounted as normal if it isn't in use during
|
|
automount expire.
|
|
|
|
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
---
|
|
CHANGELOG | 1 +
|
|
lib/mounts.c | 8 ++++----
|
|
2 files changed, 5 insertions(+), 4 deletions(-)
|
|
|
|
--- autofs-5.1.7.orig/CHANGELOG
|
|
+++ autofs-5.1.7/CHANGELOG
|
|
@@ -163,6 +163,7 @@
|
|
- fix deadlock in remount.
|
|
- fix amd external mount error handling.
|
|
- fix amd external mount mount handling.
|
|
+- don't free ext mount if mounted.
|
|
|
|
25/01/2021 autofs-5.1.7
|
|
- make bind mounts propagation slave by default.
|
|
--- autofs-5.1.7.orig/lib/mounts.c
|
|
+++ autofs-5.1.7/lib/mounts.c
|
|
@@ -906,10 +906,10 @@ int ext_mount_remove(const char *path)
|
|
if (!em)
|
|
goto done;
|
|
|
|
- em->ref--;
|
|
if (em->ref)
|
|
- goto done;
|
|
- else {
|
|
+ em->ref--;
|
|
+
|
|
+ if (!em->ref && !is_mounted(path, MNTS_REAL)) {
|
|
hlist_del_init(&em->mount);
|
|
free(em->mp);
|
|
if (em->umount)
|
|
@@ -931,7 +931,7 @@ int ext_mount_inuse(const char *path)
|
|
em = ext_mount_lookup(path);
|
|
if (!em)
|
|
goto done;
|
|
- ret = em->ref;
|
|
+ ret = 1;
|
|
done:
|
|
ext_mount_hash_mutex_unlock();
|
|
return ret;
|