57 lines
1.8 KiB
Diff
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.7.orig/CHANGELOG
|
||
|
+++ autofs-5.1.7/CHANGELOG
|
||
|
@@ -137,6 +137,7 @@
|
||
|
- include addtional log info for mounts.
|
||
|
- fix amd selector function matching.
|
||
|
- get rid entry thid field.
|
||
|
+- continue expire immediately after submount check.
|
||
|
|
||
|
25/01/2021 autofs-5.1.7
|
||
|
- make bind mounts propagation slave by default.
|
||
|
--- autofs-5.1.7.orig/daemon/direct.c
|
||
|
+++ autofs-5.1.7/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.7.orig/daemon/indirect.c
|
||
|
+++ autofs-5.1.7/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 &&
|