core: prevent spurious retries of umount
authorAlan Jenkins <alan.christopher.jenkins@gmail.com>
Sat, 13 Jan 2018 17:22:46 +0000 (17:22 +0000)
committerAlan Jenkins <alan.christopher.jenkins@gmail.com>
Sat, 13 Jan 2018 17:22:46 +0000 (17:22 +0000)
commit3cc9685649000b9f840976d98396f55624f2329b
treed07cb233a7c4f9171b738f133b9791562f26d852
parent5804e1b6ff2d871500f9bc205e6fa28d4e984961
core: prevent spurious retries of umount

Testing the previous commit with `systemctl stop tmp.mount` logged the
reason for failure as expected, but unexpectedly the message was repeated
32 times.

The retry is a special case for umount; it is only supposed to cover the
case where the umount command was _successful_, but there was still some
remaining mount(s) underneath.  Fix it by making sure to test the first
condition :).

Re-tested with and without a preceding `mount --bind /mnt /tmp`,
and using `findmnt` to check the end result.
src/core/mount.c