summaryrefslogtreecommitdiff
path: root/fs/autofs4/root.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/autofs4/root.c')
-rw-r--r--fs/autofs4/root.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index d196712c4b94..3a4a5b47575c 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -330,6 +330,10 @@ static int try_to_fill_dentry(struct vfsmount *mnt, struct dentry *dentry, int f
if (!autofs4_oz_mode(sbi))
autofs4_update_usage(mnt, dentry);
+ /* Initialize expiry counter after successful mount */
+ if (ino)
+ ino->last_used = jiffies;
+
spin_lock(&dentry->d_lock);
dentry->d_flags &= ~DCACHE_AUTOFS_PENDING;
spin_unlock(&dentry->d_lock);