diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-10-10 22:28:55 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-10-10 22:57:02 +0200 |
commit | 052364d41f432c5a2357122a41d5f60cabb63a5e (patch) | |
tree | 1940502d754773776dfa014ba200343e985bdba7 /src | |
parent | f2aed3070d2c3bc6f380b711b1bdcebbda1bd1e8 (diff) |
core: simplify if branches a bit
We do the same thing in two branches, let's merge them. Let's also add an
explanatory comment, while we are at it.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/mount.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/mount.c b/src/core/mount.c index 26c33b94ea..f5e67b1d78 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -1200,9 +1200,10 @@ static void mount_sigchld_event(Unit *u, pid_t pid, int code, int status) { case MOUNT_MOUNTING_SIGKILL: case MOUNT_MOUNTING_SIGTERM: - if (f == MOUNT_SUCCESS) - mount_enter_mounted(m, f); - else if (m->from_proc_self_mountinfo) + if (f == MOUNT_SUCCESS || m->from_proc_self_mountinfo) + /* If /bin/mount returned success, or if we see the mount point in /proc/self/mountinfo we are + * happy. If we see the first condition first, we should see the the second condition + * immediately after – or /bin/mount lies to us and is broken. */ mount_enter_mounted(m, f); else mount_enter_dead(m, f); |