summaryrefslogtreecommitdiff
path: root/src/core/mount.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-10-11 13:40:50 -0400
committerGitHub <noreply@github.com>2016-10-11 13:40:50 -0400
commitb744e8937ce603090a9bf64ac7d8cc2c1a29e4f0 (patch)
treed6873059fd870c78dae268671ad0e12ac8c493db /src/core/mount.c
parent40f45ff0c339971fd088e6f9cc2e61444087685d (diff)
parenta46eac1bbddcdd15e741fc6c8389078db1067f81 (diff)
Merge pull request #4067 from poettering/invocation-id
Add an "invocation ID" concept to the service manager
Diffstat (limited to 'src/core/mount.c')
-rw-r--r--src/core/mount.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/mount.c b/src/core/mount.c
index f5e67b1d78..15619dffe3 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -1006,6 +1006,10 @@ static int mount_start(Unit *u) {
return r;
}
+ r = unit_acquire_invocation_id(u);
+ if (r < 0)
+ return r;
+
m->result = MOUNT_SUCCESS;
m->reload_result = MOUNT_SUCCESS;
m->reset_cpu_usage = true;
@@ -1746,9 +1750,10 @@ static int mount_dispatch_io(sd_event_source *source, int fd, uint32_t revents,
case MOUNT_DEAD:
case MOUNT_FAILED:
- /* This has just been mounted by
- * somebody else, follow the state
- * change. */
+
+ /* This has just been mounted by somebody else, follow the state change, but let's
+ * generate a new invocation ID for this implicitly and automatically. */
+ (void) unit_acquire_invocation_id(UNIT(mount));
mount_enter_mounted(mount, MOUNT_SUCCESS);
break;