mirror of
https://github.com/systemd/systemd.git
synced 2024-11-02 02:21:44 +03:00
automount: don't cancel mount/umount request on reload/reexec (#3670)
All pending tokens are already serialized correctly and will be handled when the mount unit is done. Without this a 'daemon-reload' cancels all pending tokens. Any process waiting for the mount will continue with EHOSTDOWN. This can happen when the mount unit waits for it's dependencies, e.g. network, devices, fsck, etc.
This commit is contained in:
parent
2de0b9e913
commit
87d41d6244
@ -98,9 +98,6 @@ static void unmount_autofs(Automount *a) {
|
|||||||
if (a->pipe_fd < 0)
|
if (a->pipe_fd < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
automount_send_ready(a, a->tokens, -EHOSTDOWN);
|
|
||||||
automount_send_ready(a, a->expire_tokens, -EHOSTDOWN);
|
|
||||||
|
|
||||||
a->pipe_event_source = sd_event_source_unref(a->pipe_event_source);
|
a->pipe_event_source = sd_event_source_unref(a->pipe_event_source);
|
||||||
a->pipe_fd = safe_close(a->pipe_fd);
|
a->pipe_fd = safe_close(a->pipe_fd);
|
||||||
|
|
||||||
@ -109,6 +106,9 @@ static void unmount_autofs(Automount *a) {
|
|||||||
if (a->where &&
|
if (a->where &&
|
||||||
(UNIT(a)->manager->exit_code != MANAGER_RELOAD &&
|
(UNIT(a)->manager->exit_code != MANAGER_RELOAD &&
|
||||||
UNIT(a)->manager->exit_code != MANAGER_REEXECUTE)) {
|
UNIT(a)->manager->exit_code != MANAGER_REEXECUTE)) {
|
||||||
|
automount_send_ready(a, a->tokens, -EHOSTDOWN);
|
||||||
|
automount_send_ready(a, a->expire_tokens, -EHOSTDOWN);
|
||||||
|
|
||||||
r = repeat_unmount(a->where, MNT_DETACH);
|
r = repeat_unmount(a->where, MNT_DETACH);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
log_error_errno(r, "Failed to unmount: %m");
|
log_error_errno(r, "Failed to unmount: %m");
|
||||||
|
Loading…
Reference in New Issue
Block a user