diff options
author | Jan Janssen <medhefgo@web.de> | 2018-03-08 18:46:58 +0100 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-07-19 12:27:22 -0400 |
commit | 29abfd9f86983e71737d111d5131dfa0ad49a0a7 (patch) | |
tree | dcdcd8a0e10aaa0a589253f0fcc44271711fff83 | |
parent | af0c7d3598cd8e3ca279bffbd435a666c046043c (diff) |
umount: Try unmounting even if remounting read-only failed
In the case of some api filesystems remounting read-only fails
while unmounting succeeds.
(cherry picked from commit 8645ffd12b3cc7b0292acd9e1d691c4fab4cf409)
-rw-r--r-- | src/core/umount.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/umount.c b/src/core/umount.c index 67612ed0ec..f4a977f5bb 100644 --- a/src/core/umount.c +++ b/src/core/umount.c @@ -519,16 +519,19 @@ static int mount_points_list_umount(MountPoint **head, bool *changed) { * somehwere else via a bind mount. If we * explicitly remount the super block of that * alias read-only we hence should be - * relatively safe regarding keeping dirty an fs + * relatively safe regarding keeping a dirty fs * we cannot otherwise see. * * Since the remount can hang in the instance of * remote filesystems, we remount asynchronously - * and skip the subsequent umount if it fails */ + * and skip the subsequent umount if it fails. */ if (remount_with_timeout(m) < 0) { - if (nonunmountable_path(m->path)) + /* Remount failed, but try unmounting anyway, + * unless this is a mount point we want to skip. */ + if (nonunmountable_path(m->path)) { n_failed++; - continue; + continue; + } } } |