summaryrefslogtreecommitdiffstats
path: root/sys/nfs
diff options
context:
space:
mode:
authoreivind <eivind@FreeBSD.org>1999-11-27 18:14:41 +0000
committereivind <eivind@FreeBSD.org>1999-11-27 18:14:41 +0000
commit6e2e0f5931f1a9993eb47ee521c2ae52379c87f8 (patch)
tree175dc164ce2b20bedfad2db353ccdf04dfb29945 /sys/nfs
parent306c565c67e78d7c84c297d1951b66058512c5f8 (diff)
downloadFreeBSD-src-6e2e0f5931f1a9993eb47ee521c2ae52379c87f8.zip
FreeBSD-src-6e2e0f5931f1a9993eb47ee521c2ae52379c87f8.tar.gz
Remap the error EEXISTS => 0 *before* using error to determine if we should
return a vp.
Diffstat (limited to 'sys/nfs')
-rw-r--r--sys/nfs/nfs_vnops.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c
index 867a6b1..6c6ae61 100644
--- a/sys/nfs/nfs_vnops.c
+++ b/sys/nfs/nfs_vnops.c
@@ -1812,18 +1812,20 @@ nfs_symlink(ap)
nfsm_wcc_data(dvp, wccflag);
}
nfsm_reqdone;
- if (newvp && error)
- vput(newvp);
- else
- *ap->a_vpp = newvp;
- VTONFS(dvp)->n_flag |= NMODIFIED;
- if (!wccflag)
- VTONFS(dvp)->n_attrstamp = 0;
/*
* Kludge: Map EEXIST => 0 assuming that it is a reply to a retry.
*/
if (error == EEXIST)
error = 0;
+
+ if (error) {
+ if (newvp)
+ vput(newvp);
+ } else
+ *ap->a_vpp = newvp;
+ VTONFS(dvp)->n_flag |= NMODIFIED;
+ if (!wccflag)
+ VTONFS(dvp)->n_attrstamp = 0;
/*
* cnp's buffer expected to be freed if SAVESTART not set or
* if an error was returned.
OpenPOWER on IntegriCloud