diff options
Diffstat (limited to 'src/core/mount.c')
-rw-r--r-- | src/core/mount.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/core/mount.c b/src/core/mount.c index 8bfbbed2c0..d3a4098f1a 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -548,7 +548,7 @@ static int mount_load(Unit *u) { return mount_verify(m); } -static int mount_notify_automount(Mount *m, int status) { +static int mount_notify_automount(Mount *m, MountState old_state, MountState state) { Unit *p; int r; Iterator i; @@ -557,7 +557,7 @@ static int mount_notify_automount(Mount *m, int status) { SET_FOREACH(p, UNIT(m)->dependencies[UNIT_TRIGGERED_BY], i) if (p->type == UNIT_AUTOMOUNT) { - r = automount_send_ready(AUTOMOUNT(p), status); + r = automount_update_mount(AUTOMOUNT(p), old_state, state); if (r < 0) return r; } @@ -588,21 +588,7 @@ static void mount_set_state(Mount *m, MountState state) { m->control_command_id = _MOUNT_EXEC_COMMAND_INVALID; } - if (state == MOUNT_MOUNTED || - state == MOUNT_REMOUNTING) - mount_notify_automount(m, 0); - else if (state == MOUNT_DEAD || - state == MOUNT_UNMOUNTING || - state == MOUNT_MOUNTING_SIGTERM || - state == MOUNT_MOUNTING_SIGKILL || - state == MOUNT_REMOUNTING_SIGTERM || - state == MOUNT_REMOUNTING_SIGKILL || - state == MOUNT_UNMOUNTING_SIGTERM || - state == MOUNT_UNMOUNTING_SIGKILL || - state == MOUNT_FAILED) { - if (state != old_state) - mount_notify_automount(m, -ENODEV); - } + mount_notify_automount(m, old_state, state); if (state != old_state) log_unit_debug(UNIT(m)->id, |