summaryrefslogtreecommitdiffstats
path: root/mount/umount.c
diff options
context:
space:
mode:
authorKarel Zak2006-12-07 00:25:54 +0100
committerKarel Zak2006-12-07 00:25:54 +0100
commit1d4ad1decc539c9729b592e6050460d6487c95f4 (patch)
treec158c5f5baf15ea4bab5c05b2f6e2bdaca332c29 /mount/umount.c
parentImported from util-linux-2.11o tarball. (diff)
downloadkernel-qcow2-util-linux-1d4ad1decc539c9729b592e6050460d6487c95f4.tar.gz
kernel-qcow2-util-linux-1d4ad1decc539c9729b592e6050460d6487c95f4.tar.xz
kernel-qcow2-util-linux-1d4ad1decc539c9729b592e6050460d6487c95f4.zip
Imported from util-linux-2.11q tarball.
Diffstat (limited to 'mount/umount.c')
-rw-r--r--mount/umount.c10
1 files changed, 5 insertions, 5 deletions
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);