mount: try lazy unmount if normal one fails
[project/mountd.git] / mount.c
diff --git a/mount.c b/mount.c
index ddcd5b3..3994149 100644 (file)
--- a/mount.c
+++ b/mount.c
@@ -604,6 +604,7 @@ static int mount_dev_del(struct mount *mount)
                log_printf("device %s has disappeared ... unmounting %s\n", mount->dev, tmp);
                if (umount(tmp)) {
                        err = -errno;
+                       umount2(tmp, MNT_DETACH);
                }
                rmdir(tmp);
                mount_dump_uci_state();