shutdown: don't consider umounting of / and /usr failed

In the words of Homer: If you don't try, you can't fail.

This is a revert of 9279749b84.

It used to be necessary to consider the umounting failed to make sure /
and /usr were remounted read-only, but that is no longer necessary as
everything is now remounted read-only anyway.

Moreover, this avoids a warning at shutdown saying a filesystem was not
unmounted. As the umounting of / is never attempted there was no
corresponding warning message saying which fs that failed. This caused some
spurious bug-reports from concerned users.

Cc: Michael Biebl <biebl@debian.org>
This commit is contained in:
Tom Gundersen 2012-11-28 18:08:54 +01:00
parent 02eaa78835
commit 140883405e
1 changed files with 3 additions and 4 deletions

View File

@ -433,15 +433,14 @@ static int mount_points_list_umount(MountPoint **head, bool *changed, bool log_e
}
/* Skip / and /usr since we cannot unmount that
* anyway, since we are running from it */
* anyway, since we are running from it. They have already been
* remounte ro. */
if (path_equal(m->path, "/")
#ifndef HAVE_SPLIT_USR
|| path_equal(m->path, "/usr")
#endif
) {
n_failed++;
)
continue;
}
/* Trying to umount. Forcing to umount if busy (only for NFS mounts) */
if (umount2(m->path, MNT_FORCE) == 0) {