summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2015-01-28 13:53:25 +0100
committerLennart Poettering <lennart@poettering.net>2015-01-28 17:02:28 +0100
commit06e97888883e2cc12eb6514e80c7f0014295f59b (patch)
tree88e8c008cdff4cf33d968740398fd8524b40fdb5
parent3315f085178f46155fda345d9526c09083b45946 (diff)
core/mount: add dependencies to dynamically mounted mounts too
Add unit dependencies for dynamic (i. e. not from fstab) mounts. With that, mount units properly bind to their underlying device, and thus get automatically stopped/unmounted when the underlying device goes away. This cleans up stale mounts from unplugged devices. Thanks to Lennart Poettering for pointing out the fix!
-rw-r--r--src/core/mount.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/mount.c b/src/core/mount.c
index 6bd6914509..a0b5fda9cb 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -300,7 +300,7 @@ static int mount_add_device_links(Mount *m) {
assert(m);
- p = get_mount_parameters_fragment(m);
+ p = get_mount_parameters(m);
if (!p)
return 0;