From 0c90e4811329ee5803dd397bb0e121c19f313935 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Apr 16 2021 22:13:57 +0000 Subject: Apply patch autofs-5.1.6-fix-stale-offset-directories-disable-mount.patch patch_name: autofs-5.1.6-fix-stale-offset-directories-disable-mount.patch present_in_specfile: true --- diff --git a/CHANGELOG b/CHANGELOG index 674766b..422e946 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -127,6 +127,7 @@ xx/xx/2018 autofs-5.1.5 - make umount_autofs() static. - remove force parameter from umount_all(). - fix remount expire. +- fix stale offset directories disable mount. 19/12/2017 autofs-5.1.4 - fix spec file url. diff --git a/lib/mounts.c b/lib/mounts.c index 8eaea98..b1869cb 100644 --- a/lib/mounts.c +++ b/lib/mounts.c @@ -2182,15 +2182,23 @@ int try_remount(struct autofs_point *ap, struct mapent *me, unsigned int type) * number for the mount but we can't know if we created * it or not. However, if this is an indirect mount with * the nobrowse option we need to remove the mount point - * directory at umount anyway. + * directory at umount anyway. Also, if this is an offset + * mount that's not within a real mount then we know we + * created it so we must remove it on expire for the mount + * to function. */ if (type == t_indirect) { if (ap->flags & MOUNT_FLAG_GHOST) ap->flags &= ~MOUNT_FLAG_DIR_CREATED; else ap->flags |= MOUNT_FLAG_DIR_CREATED; - } else + } else { me->flags &= ~MOUNT_FLAG_DIR_CREATED; + if (type == t_offset) { + if (!is_mounted(me->parent->key, MNTS_REAL)) + me->flags |= MOUNT_FLAG_DIR_CREATED; + } + } /* * Either we opened the mount or we're re-reading the map.