From: Neil Brown Date: Thu, 11 Oct 2007 01:29:07 +0000 (+1000) Subject: Don't fail an unmount just because we couldn't contact the NFS server. X-Git-Tag: nfs-utils-1-1-1~14 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=commitdiff_plain;h=df0a06a985a15f088d0a7fb39c61a98e6aac9830 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 --- 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");