assert(path);
for (;;) {
+ /* If there are multiple mounts on a mount point, this
+ * removes them all */
if (umount2(path, MNT_DETACH) >= 0)
continue;
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;