|
Zbigniew Jędrzejewski-Szmek |
47c564 |
From 3a144cfb90e6c0c6586a976138fc8e472b90bbaf Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
From: Lennart Poettering <lennart@poettering.net>
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
Date: Wed, 26 Feb 2014 04:28:37 +0100
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
Subject: [PATCH] mount: don't fire PropertiesChanged signals for mounts that
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
are stopped
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
(cherry picked from commit aef831369cd2a7a1bd4a58dd96ff8628ed6a85f9)
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
src/core/mount.c | 9 ++++++---
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
1 file changed, 6 insertions(+), 3 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
diff --git a/src/core/mount.c b/src/core/mount.c
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
index 75b133b..68b2e83 100644
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
--- a/src/core/mount.c
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
+++ b/src/core/mount.c
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
@@ -1676,20 +1676,20 @@ static int mount_dispatch_io(sd_event_source *source, int fd, uint32_t revents,
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
Mount *mount = MOUNT(u);
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
if (!mount->is_mounted) {
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
- /* This has just been unmounted. */
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
mount->from_proc_self_mountinfo = false;
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
switch (mount->state) {
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
case MOUNT_MOUNTED:
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
+ /* This has just been unmounted by
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
+ * somebody else, follow the state
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
+ * change. */
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
mount_enter_dead(mount, MOUNT_SUCCESS);
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
break;
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
default:
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
- mount_set_state(mount, mount->state);
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
break;
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
-
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
} else if (mount->just_mounted || mount->just_changed) {
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
@@ -1700,6 +1700,9 @@ static int mount_dispatch_io(sd_event_source *source, int fd, uint32_t revents,
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
case MOUNT_DEAD:
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
case MOUNT_FAILED:
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
+ /* This has just been mounted by
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
+ * somebody else, follow the state
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
+ * change. */
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
mount_enter_mounted(mount, MOUNT_SUCCESS);
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
break;
|
|
Zbigniew Jędrzejewski-Szmek |
47c564 |
|