summaryrefslogtreecommitdiff
path: root/src/core/unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-02-27 21:55:08 +0100
committerLennart Poettering <lennart@poettering.net>2015-02-28 17:38:38 +0100
commit628c89cc68ab96fce2de7ebba5933725d147aecc (patch)
tree0ad23950d2ff4895b0de0c4163baa9be8617c4e3 /src/core/unit.c
parent1a1db450e54c549382e8466130e63b91ae78b552 (diff)
core: rework device state logic
This change introduces a new state "tentative" for device units. Device units are considered "plugged" when udev announced them, "dead" when they are not available in the kernel, and "tentative" when they are referenced in /proc/self/mountinfo or /proc/swaps but not (yet) announced via udev. This should fix a race when device nodes (like loop devices) are created and immediately mounted. Previously, systemd might end up seeing the mount unit before the device, and would thus pull down the mount because its BindTo dependency on the device would not be fulfilled.
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index 63ccd671d..7cd704351 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -2834,7 +2834,6 @@ int unit_add_node_link(Unit *u, const char *what, bool wants) {
return -ENOMEM;
r = manager_load_unit(u->manager, e, NULL, NULL, &device);
-
if (r < 0)
return r;