]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: add comments about n_reloading to manager_deserialize()
authorLennart Poettering <lennart@poettering.net>
Tue, 9 Oct 2018 14:59:16 +0000 (16:59 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 9 Oct 2018 17:43:43 +0000 (19:43 +0200)
src/core/manager.c

index 48fca6225200846cd5b09adbebffc439bb2dde68..56d4b11baeb20bf588d37849c70a79d37ed8ad44 100644 (file)
@@ -3194,6 +3194,9 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
 
         log_debug("Deserializing state...");
 
+        /* If we are not in reload mode yet, enter it now. Not that this is recursive, a caller might already have
+         * increased it to non-zero, which is why we just increase it by one here and down again at the end of this
+         * call. */
         m->n_reloading++;
 
         for (;;) {
@@ -3431,6 +3434,7 @@ finish:
         if (ferror(f))
                 r = -EIO;
 
+        /* We are done with reloading, decrease counter again */
         assert(m->n_reloading > 0);
         m->n_reloading--;