From: LaMont Jones Date: Mon, 27 Aug 2007 09:37:33 +0000 (-0600) Subject: Revert "umount: only call update_mtab if mtab_is_writable()." X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f61d903e6ee920d8a0b28c6b6f481fa4183e750a;p=util-linux 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. --- 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); }