From 628c89cc68ab96fce2de7ebba5933725d147aecc Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 27 Feb 2015 21:55:08 +0100 Subject: 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. --- src/core/unit.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/core/unit.c') 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; -- cgit v1.2.3