X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmount%2Fnfsumount.c;h=8902f0088a0533abdd3a0d64a06ac938d4231d86;hp=4311473b5536f892ad65492b601479c77f394831;hb=af5939d15a41b337cc499a04fe4001a5cd51fdce;hpb=e90a21266b0bed721d6df4468cf85f06d578fc8e diff --git a/utils/mount/nfsumount.c b/utils/mount/nfsumount.c index 4311473..8902f00 100644 --- a/utils/mount/nfsumount.c +++ b/utils/mount/nfsumount.c @@ -102,10 +102,14 @@ static int del_mtab(const char *spec, const char *node) } else res = umount (node); - if (res < 0 && remount && errno == EBUSY && spec) { - res = try_remount(spec, node); - if (!res) + if (res < 0) { + if (remount && errno == EBUSY && spec) { + res = try_remount(spec, node); + if (res) + goto writemtab; return 0; + } else + umnt_err = errno; } if (res >= 0) { @@ -344,7 +348,7 @@ int nfsumount(int argc, char *argv[]) ret = 0; if (mc) { - if (!lazy) + 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);