daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
923a60
From 4b125d957a082250b83ff1bff775edefe90356de Mon Sep 17 00:00:00 2001
923a60
From: David Tardon <dtardon@redhat.com>
923a60
Date: Mon, 19 Nov 2018 15:58:27 +0100
923a60
Subject: [PATCH] set automount state to waiting when the mount is stopped
923a60
923a60
Resolves: #1651257
923a60
---
923a60
 src/core/automount.c | 2 ++
923a60
 1 file changed, 2 insertions(+)
923a60
923a60
diff --git a/src/core/automount.c b/src/core/automount.c
923a60
index f57782b9b8..4678bdc7c9 100644
923a60
--- a/src/core/automount.c
923a60
+++ b/src/core/automount.c
923a60
@@ -523,6 +523,8 @@ int automount_update_mount(Automount *a, MountState old_state, MountState state)
923a60
                 if (old_state != state)
923a60
                         automount_send_ready(a, a->tokens, -ENODEV);
923a60
                 (void) sd_event_source_set_enabled(a->expire_event_source, SD_EVENT_OFF);
923a60
+                if (a->state == AUTOMOUNT_RUNNING)
923a60
+                        automount_set_state(a, AUTOMOUNT_WAITING);
923a60
                 break;
923a60
         default:
923a60
                 break;