From: Lennart Poettering Date: Tue, 9 Oct 2018 14:59:16 +0000 (+0200) Subject: core: add comments about n_reloading to manager_deserialize() X-Git-Tag: v240~585^2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eb10d0bf8a40e154614eb3b046dc619dcfd55e2b;p=thirdparty%2Fsystemd.git core: add comments about n_reloading to manager_deserialize() --- diff --git a/src/core/manager.c b/src/core/manager.c index 48fca622520..56d4b11baeb 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -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--;