mount: when we fail to establish an inaccessible mount gracefully, undo the mount

This commit is contained in:
Lennart Poettering
2019-03-21 12:41:02 +01:00
parent 74b6ce90a0
commit 2c9b7a7e62
+3 -1
View File
@@ -847,8 +847,10 @@ static int mount_inaccessible(const char *dest, CustomMount *m) {
return m->graceful ? 0 : r;
r = mount_verbose(m->graceful ? LOG_DEBUG : LOG_ERR, NULL, where, NULL, MS_BIND|MS_RDONLY|MS_REMOUNT, NULL);
if (r < 0)
if (r < 0) {
umount_verbose(where);
return m->graceful ? 0 : r;
}
return 0;
}