summaryrefslogtreecommitdiff
path: root/src/automount.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-05-19 03:42:05 +0200
committerLennart Poettering <lennart@poettering.net>2010-05-19 03:42:05 +0200
commit1b5601907efffd364b660bb75156b2aed49c46a4 (patch)
tree0cccd16dcf0766790b3002ea1eb13015a273873b /src/automount.c
parentc8513d54d23a36fc84b2f0b96989da3041ad15bc (diff)
automount: never consider our own mount point a prefix mount of us
Diffstat (limited to 'src/automount.c')
-rw-r--r--src/automount.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/automount.c b/src/automount.c
index 465354f555..32680461c2 100644
--- a/src/automount.c
+++ b/src/automount.c
@@ -59,6 +59,8 @@ static void repeat_unmout(const char *path) {
assert(path);
for (;;) {
+ /* If there are multiple mounts on a mount point, this
+ * removes them all */
if (umount2(path, MNT_DETACH) >= 0)
continue;
@@ -118,6 +120,9 @@ int automount_add_one_mount_link(Automount *a, Mount *m) {
if (!path_startswith(a->where, m->where))
return 0;
+ if (path_equal(a->where, m->where))
+ return 0;
+
if ((r = unit_add_dependency(UNIT(m), UNIT_BEFORE, UNIT(a), true)) < 0)
return r;