From 93a3b53b2be5566b8f05746860645cbe99059701 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Fri, 24 Jul 2015 17:40:55 +0200 Subject: automount: do not start expiration timer for TimeoutIdleSec=0 The timer value for automount unit specified with TimeoutIdleSec= is rounded up to one second if that directive is set to 0. Fix this by bailing early in automount_enter_runnning() in case no timeout is requested. --- src/core/automount.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core') diff --git a/src/core/automount.c b/src/core/automount.c index 342dd8f0a9..b8a8a92b54 100644 --- a/src/core/automount.c +++ b/src/core/automount.c @@ -672,6 +672,9 @@ static int automount_start_expire(Automount *a) { assert(a); + if (a->timeout_idle_usec == 0) + return 0; + timeout = now(CLOCK_MONOTONIC) + MAX(a->timeout_idle_usec/3, USEC_PER_SEC); if (a->expire_event_source) { -- cgit v1.2.3-54-g00ecf