From df0a06a985a15f088d0a7fb39c61a98e6aac9830 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Thu, 11 Oct 2007 11:29:07 +1000 Subject: [PATCH] Don't fail an unmount just because we couldn't contact the NFS server. If we fail to talk to the NFS server when unmounted a v2 or v3 mount, still do the unmount, but allow the error to propagate up. Signed-off-by: Neil Brown --- utils/mount/nfsumount.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils/mount/nfsumount.c b/utils/mount/nfsumount.c index 8902f00..9e9cd16 100644 --- a/utils/mount/nfsumount.c +++ b/utils/mount/nfsumount.c @@ -350,8 +350,7 @@ int nfsumount(int argc, char *argv[]) if (mc) { if (!lazy && strcmp(mc->m.mnt_type, "nfs4") != 0) ret = do_nfs_umount(mc->m.mnt_fsname, mc->m.mnt_opts); - if (!ret || force) - ret = del_mtab(mc->m.mnt_fsname, mc->m.mnt_dir); + ret = del_mtab(mc->m.mnt_fsname, mc->m.mnt_dir) ?: ret; } else if (*spec != '/') { if (!lazy) ret = do_nfs_umount(spec, "tcp,v3"); -- 2.39.2