]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/unit: try to submit stop_when_unneeded queue on removing dependencies
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 27 Jun 2022 21:11:53 +0000 (06:11 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 27 Jun 2022 21:34:09 +0000 (06:34 +0900)
Fixes #23410.

src/core/unit.c

index 180dccc2b291f85ec49a8f8a68408582626a0893..d933bfc0cc03113045d4968c756f2412ba6a024d 100644 (file)
@@ -5165,6 +5165,9 @@ void unit_remove_dependencies(Unit *u, UnitDependencyMask mask) {
 
                                 unit_add_to_gc_queue(other);
 
+                                /* The unit 'other' may not be wanted by the unit 'u'. */
+                                unit_submit_to_stop_when_unneeded_queue(other);
+
                                 done = false;
                                 break;
                         }