From 000c8789fff1de520689e6d26c3f799654a9a931 Mon Sep 17 00:00:00 2001 From: Packit Bot Date: May 04 2021 22:13:43 +0000 Subject: Apply patch autofs-5.1.6-fix-remount-expire.patch patch_name: autofs-5.1.6-fix-remount-expire.patch present_in_specfile: true --- diff --git a/CHANGELOG b/CHANGELOG index 592fd0e..674766b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -126,6 +126,7 @@ xx/xx/2018 autofs-5.1.5 - use mnt_list for amdmounts. - make umount_autofs() static. - remove force parameter from umount_all(). +- fix remount expire. 19/12/2017 autofs-5.1.4 - fix spec file url. diff --git a/lib/mounts.c b/lib/mounts.c index 4276467..8eaea98 100644 --- a/lib/mounts.c +++ b/lib/mounts.c @@ -2205,8 +2205,14 @@ int try_remount(struct autofs_point *ap, struct mapent *me, unsigned int type) if (fd != -1) { if (type == t_indirect) ap->ioctlfd = fd; - else + else { + if (type == t_offset && + !is_mounted(me->key, MNTS_REAL)) { + ops->close(ap->logopt, fd); + fd = -1; + } me->ioctlfd = fd; + } return 1; }