mount: fix for complex automounts

If accessing an automount point triggers more changes to
/proc/self/mountinfo than just to add the directly wanted mount, these
changes can lead to spurious -ENODEV notifications on the automount unit
causing the request to fail when in fact the mount will be setup right
afterwards.
This commit is contained in:
Malte Starostik 2012-06-05 21:10:28 +02:00 committed by Lennart Poettering
parent a9f55579e8
commit 36fcd77e02
1 changed files with 4 additions and 2 deletions

View File

@ -687,8 +687,10 @@ static void mount_set_state(Mount *m, MountState state) {
state == MOUNT_REMOUNTING_SIGKILL ||
state == MOUNT_UNMOUNTING_SIGTERM ||
state == MOUNT_UNMOUNTING_SIGKILL ||
state == MOUNT_FAILED)
mount_notify_automount(m, -ENODEV);
state == MOUNT_FAILED) {
if (state != old_state)
mount_notify_automount(m, -ENODEV);
}
if (state != old_state)
log_debug("%s changed %s -> %s",