From 06e97888883e2cc12eb6514e80c7f0014295f59b Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 28 Jan 2015 13:53:25 +0100 Subject: [PATCH] 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! --- src/core/mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/mount.c b/src/core/mount.c index 6bd691450..a0b5fda9c 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; -- 2.30.2