]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mount/nfsumount.c
Don't fail an unmount just because we couldn't contact the NFS server.
[nfs-utils.git] / utils / mount / nfsumount.c
index 8902f0088a0533abdd3a0d64a06ac938d4231d86..9e9cd16a66e8c5d959e07dc8a129716d97adbe9a 100644 (file)
@@ -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");