* the bus queue, so that any job change signal queued will force out the unit change signal first. */
unit_add_to_dbus_queue(u);
- /* Update systemd-oomd on the property/state change */
- if (os != ns) {
- /* Always send an update if the unit is going into an inactive state so systemd-oomd knows to stop
- * monitoring.
- * Also send an update whenever the unit goes active; this is to handle a case where an override file
- * sets one of the ManagedOOM*= properties to "kill", then later removes it. systemd-oomd needs to
- * know to stop monitoring when the unit changes from "kill" -> "auto" on daemon-reload, but we don't
- * have the information on the property. Thus, indiscriminately send an update. */
- if (UNIT_IS_INACTIVE_OR_FAILED(ns) || UNIT_IS_ACTIVE_OR_RELOADING(ns))
- (void) manager_varlink_send_managed_oom_update(u);
- }
+ /* Update systemd-oomd on the property/state change.
+ *
+ * Always send an update if the unit is going into an inactive state so systemd-oomd knows to
+ * stop monitoring.
+ * Also send an update whenever the unit goes active; this is to handle a case where an override file
+ * sets one of the ManagedOOM*= properties to "kill", then later removes it. systemd-oomd needs to
+ * know to stop monitoring when the unit changes from "kill" -> "auto" on daemon-reload, but we don't
+ * have the information on the property. Thus, indiscriminately send an update. */
+ if (os != ns && (UNIT_IS_INACTIVE_OR_FAILED(ns) || UNIT_IS_ACTIVE_OR_RELOADING(ns)))
+ (void) manager_varlink_send_managed_oom_update(u);
/* Update timestamps for state changes */
if (!MANAGER_IS_RELOADING(m)) {
/* Maybe we can release some resources now? */
unit_submit_to_release_resources_queue(u);
- }
- if (UNIT_IS_ACTIVE_OR_RELOADING(ns)) {
+ } else if (UNIT_IS_ACTIVE_OR_RELOADING(ns)) {
/* Start uphold units regardless if going up was expected or not */
check_uphold_dependencies(u);