summaryrefslogtreecommitdiffstats
path: root/mount/umount.c
diff options
context:
space:
mode:
Diffstat (limited to 'mount/umount.c')
-rw-r--r--mount/umount.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mount/umount.c b/mount/umount.c
index 80030c9e3..676ed8cc2 100644
--- a/mount/umount.c
+++ b/mount/umount.c
@@ -349,7 +349,8 @@ umount_one (const char *spec, const char *node, const char *type,
remnt.mnt_type = remnt.mnt_fsname = NULL;
remnt.mnt_dir = xstrdup(node);
remnt.mnt_opts = xstrdup("ro");
- update_mtab(node, &remnt);
+ if (!nomtab)
+ update_mtab(node, &remnt);
return 0;
} else if (errno != EBUSY) { /* hmm ... */
perror("remount");
@@ -402,7 +403,7 @@ umount_one (const char *spec, const char *node, const char *type,
del_loop(loopdev);
writemtab:
- if (!nomtab && mtab_is_writable() &&
+ if (!nomtab &&
(umnt_err == 0 || umnt_err == EINVAL || umnt_err == ENOENT)) {
update_mtab (node, NULL);
}