]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/service: call service_enter_running() if live mount fails
authorMike Yuan <me@yhndnzj.com>
Tue, 22 Oct 2024 17:30:50 +0000 (19:30 +0200)
committerMike Yuan <me@yhndnzj.com>
Tue, 22 Oct 2024 17:51:01 +0000 (19:51 +0200)
service_enter_running() would re-arm timer for RuntimeMaxSec=,
hence it should be called instead of disabling timer completely
when live mount operation fails, in a similar fashion as
service_enter_reload_by_notify().

src/core/service.c

index ab4467ab8aaef1e277848e3fff8465d1a8291f2c..c7683090ef5c80381b7d74fab6fb92e158d28e43 100644 (file)
@@ -5299,7 +5299,7 @@ static int service_live_mount(Unit *u,
 
 fail:
         s->live_mount_result = SERVICE_FAILURE_RESOURCES;
-        s->timer_event_source = sd_event_source_disable_unref(s->timer_event_source);
+        service_enter_running(s, SERVICE_SUCCESS);
         return r;
 }