summaryrefslogtreecommitdiff
path: root/src/core/mount.c
diff options
context:
space:
mode:
authorMalte Starostik <m-starostik@versanet.de>2012-06-05 21:10:28 +0200
committerLennart Poettering <lennart@poettering.net>2012-07-10 18:27:03 +0200
commit36fcd77e02cedf300e2f45f2449e7e091ef5a7ab (patch)
treebeb2e128e4b3cdf961334c69556529665d9808a0 /src/core/mount.c
parenta9f55579e8cae256b91dfec9f775622698b1a605 (diff)
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.
Diffstat (limited to 'src/core/mount.c')
-rw-r--r--src/core/mount.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/mount.c b/src/core/mount.c
index 69cb6e24e4..fab922ea9e 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -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",