Increment n_failed in mount_points_list_umount() if we skip /.
Otherwise it can happen that mount_points_list_remount_read_only() is
not called in umount_all().
assert(head);
LIST_FOREACH_SAFE(mount_point, m, n, *head) {
assert(head);
LIST_FOREACH_SAFE(mount_point, m, n, *head) {
- if (streq(m->path, "/"))
+ if (streq(m->path, "/")) {
+ n_failed++;
/* Trying to umount. Forcing to umount if busy (only for NFS mounts) */
if (umount2(m->path, MNT_FORCE) == 0) {
/* Trying to umount. Forcing to umount if busy (only for NFS mounts) */
if (umount2(m->path, MNT_FORCE) == 0) {
if (changed)
*changed = true;
if (changed)
*changed = true;