summaryrefslogtreecommitdiff
path: root/src/core/automount.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2015-07-24 17:40:55 +0200
committerDaniel Mack <daniel@zonque.org>2015-07-24 18:33:52 +0200
commit93a3b53b2be5566b8f05746860645cbe99059701 (patch)
tree7b05d87379b05f6be4b7672f196a392889f1b957 /src/core/automount.c
parenta60d8280521131e0b80a32eac4ad46403c6ef8c3 (diff)
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.
Diffstat (limited to 'src/core/automount.c')
-rw-r--r--src/core/automount.c3
1 files changed, 3 insertions, 0 deletions
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) {