autofs/SOURCES/autofs-5.1.8-continue-expire-immediately-after-submount-check.patch
2023-11-14 20:08:08 +00:00

57 lines
1.8 KiB
Diff

autofs-5.1.8 - continue expire immediately after submount check
From: Ian Kent <raven@themaw.net>
The expire proc for both direct and indirect mounts doesn't immediately
continue after seeing an autofs submount and sending it a notification.
Add the "continue" to avoid some wasted overhead.
Signed-off-by: Ian Kent <raven@themaw.net>
---
CHANGELOG | 1 +
daemon/direct.c | 5 ++++-
daemon/indirect.c | 5 ++++-
3 files changed, 9 insertions(+), 2 deletions(-)
--- autofs-5.1.4.orig/CHANGELOG
+++ autofs-5.1.4/CHANGELOG
@@ -130,6 +130,7 @@
- include addtional log info for mounts.
- fix amd selector function matching.
- get rid entry thid field.
+- continue expire immediately after submount check.
xx/xx/2018 autofs-5.1.5
- fix flag file permission.
--- autofs-5.1.4.orig/daemon/direct.c
+++ autofs-5.1.4/daemon/direct.c
@@ -854,8 +854,11 @@ void *expire_proc_direct(void *arg)
* one of them and pass on state change.
*/
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cur_state);
- if (mnt->flags & MNTS_AUTOFS)
+ if (mnt->flags & MNTS_AUTOFS) {
master_notify_submount(ap, mnt->mp, ap->state);
+ pthread_setcancelstate(cur_state, NULL);
+ continue;
+ }
if (me->ioctlfd == -1) {
pthread_setcancelstate(cur_state, NULL);
--- autofs-5.1.4.orig/daemon/indirect.c
+++ autofs-5.1.4/daemon/indirect.c
@@ -392,8 +392,11 @@ void *expire_proc_indirect(void *arg)
* one of them and pass on the state change.
*/
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cur_state);
- if (mnt->flags & MNTS_AUTOFS)
+ if (mnt->flags & MNTS_AUTOFS) {
master_notify_submount(ap, mnt->mp, ap->state);
+ pthread_setcancelstate(cur_state, NULL);
+ continue;
+ }
/* An offset without a real mount, check for manual umount */
if (mnt->flags & MNTS_OFFSET &&