]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Don't fail an unmount just because we couldn't contact the NFS server.
authorNeil Brown <neilb@suse.de>
Thu, 11 Oct 2007 01:29:07 +0000 (11:29 +1000)
committerNeil Brown <neilb@suse.de>
Thu, 11 Oct 2007 01:29:07 +0000 (11:29 +1000)
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 <neilb@suse.de>
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");