summaryrefslogtreecommitdiff
path: root/core/systemd/0008-mount-don-t-fire-PropertiesChanged-signals-for-mount.patch
blob: f0f6ffe0936805b50c29d32f2f1f504eb7a2300c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From aef831369cd2a7a1bd4a58dd96ff8628ed6a85f9 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 26 Feb 2014 04:28:37 +0100
Subject: [PATCH] mount: don't fire PropertiesChanged signals for mounts that
 are stopped

---
 src/core/mount.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/core/mount.c b/src/core/mount.c
index 98812c9..7a92e1c 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -1679,20 +1679,20 @@ static int mount_dispatch_io(sd_event_source *source, int fd, uint32_t revents,
                 Mount *mount = MOUNT(u);
 
                 if (!mount->is_mounted) {
-                        /* This has just been unmounted. */
 
                         mount->from_proc_self_mountinfo = false;
 
                         switch (mount->state) {
 
                         case MOUNT_MOUNTED:
+                                /* This has just been unmounted by
+                                 * somebody else, follow the state
+                                 * change. */
                                 mount_enter_dead(mount, MOUNT_SUCCESS);
                                 break;
 
                         default:
-                                mount_set_state(mount, mount->state);
                                 break;
-
                         }
 
                 } else if (mount->just_mounted || mount->just_changed) {
@@ -1703,6 +1703,9 @@ static int mount_dispatch_io(sd_event_source *source, int fd, uint32_t revents,
 
                         case MOUNT_DEAD:
                         case MOUNT_FAILED:
+                                /* This has just been mounted by
+                                 * somebody else, follow the state
+                                 * change. */
                                 mount_enter_mounted(mount, MOUNT_SUCCESS);
                                 break;
 
-- 
1.9.0