]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/mount.c
core: port unit_fork_helper_process() and unit_fork_and_watch_rm_rf() to PidRef
[thirdparty/systemd.git] / src / core / mount.c
index 4af2e6810e13bef718a3efbb514b12737b8ec202..08c2ddf9156592185468b5a118a9776d0847e26d 100644 (file)
@@ -2220,7 +2220,6 @@ static PidRef* mount_control_pid(Unit *u) {
 static int mount_clean(Unit *u, ExecCleanMask mask) {
         _cleanup_strv_free_ char **l = NULL;
         Mount *m = MOUNT(u);
-        pid_t pid;
         int r;
 
         assert(m);
@@ -2245,11 +2244,7 @@ static int mount_clean(Unit *u, ExecCleanMask mask) {
         if (r < 0)
                 goto fail;
 
-        r = unit_fork_and_watch_rm_rf(u, l, &pid);
-        if (r < 0)
-                goto fail;
-
-        r = pidref_set_pid(&m->control_pid, pid);
+        r = unit_fork_and_watch_rm_rf(u, l, &m->control_pid);
         if (r < 0)
                 goto fail;