]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
automount: do not start expiration timer for TimeoutIdleSec=0 714/head
authorDaniel Mack <daniel@zonque.org>
Fri, 24 Jul 2015 15:40:55 +0000 (17:40 +0200)
committerDaniel Mack <daniel@zonque.org>
Fri, 24 Jul 2015 16:33:52 +0000 (18:33 +0200)
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

index 342dd8f0a9736b197530ee4b6840146878389910..b8a8a92b54c7e165e8603c4ca58159b36f78004e 100644 (file)
@@ -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) {