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 8902f00..9e9cd16 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");