} 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) {
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);