From 1d4ad1decc539c9729b592e6050460d6487c95f4 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 7 Dec 2006 00:25:54 +0100 Subject: Imported from util-linux-2.11q tarball. --- mount/umount.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'mount/umount.c') diff --git a/mount/umount.c b/mount/umount.c index 4688495e2..0c1306a2d 100644 --- a/mount/umount.c +++ b/mount/umount.c @@ -270,12 +270,11 @@ umount_one (const char *spec, const char *node, const char *type, umnt_err = umnt_err2 = 0; if (lazy) { res = umount2 (node, MNT_DETACH); - if (res < 0) { - complain(errno, node); - return 1; - } else - return 0; + if (res < 0) + umnt_err = errno; + goto writemtab; } + if (force) { /* only supported for NFS */ res = umount2 (node, MNT_FORCE); if (res == -1) { @@ -373,6 +372,7 @@ umount_one (const char *spec, const char *node, const char *type, if (loopdev) del_loop(loopdev); + writemtab: if (!nomtab && mtab_is_writable() && (umnt_err == 0 || umnt_err == EINVAL || umnt_err == ENOENT)) { update_mtab (node, NULL); -- cgit v1.2.3-55-g7522