From f61d903e6ee920d8a0b28c6b6f481fa4183e750a Mon Sep 17 00:00:00 2001 From: LaMont Jones Date: Mon, 27 Aug 2007 03:37:33 -0600 Subject: [PATCH] Revert "umount: only call update_mtab if mtab_is_writable()." This reverts commit 4279d8b105d3dfcafcf6d190c8f6fd60a14eaece. There is a check at the top of update_mtab() that makes this unnecessary. --- mount/umount.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mount/umount.c b/mount/umount.c index 01030051..b3100c9a 100644 --- a/mount/umount.c +++ b/mount/umount.c @@ -243,7 +243,7 @@ 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"); - if (!nomtab && mtab_is_writable()) + if (!nomtab) update_mtab(node, &remnt); return 0; } else if (errno != EBUSY) { /* hmm ... */ @@ -297,7 +297,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); } -- 2.39.5