diff options
author | 2008-04-22 20:59:37 +0000 | |
---|---|---|
committer | 2008-04-22 20:59:37 +0000 | |
commit | 43647ccd9076be57c1a87bb71fce3d5fbf9f6a32 (patch) | |
tree | 61d22a5823dd33ab7848e32b9656d869fd74e16a | |
parent | Welcome sysmerge(8), a mergemaster-based utility to help you update (diff) | |
download | wireguard-openbsd-43647ccd9076be57c1a87bb71fce3d5fbf9f6a32.tar.xz wireguard-openbsd-43647ccd9076be57c1a87bb71fce3d5fbf9f6a32.zip |
Remove kludges that map EEXIST errors too a 0 return (success) for certain
operations (non-idempotent ones) under the assumption that the reply from
the server is for a duplicate of the original request.
However, most (all) NFS server today have a duplicate reply cache that
address this problem and these kludges have been shown to cause problems
with some applications (most notably dovecot as pointed out by brad@).
For more information:
http://lists.freebsd.org/pipermail/freebsd-current/2007-November/079961.html
And revision 1.277 of sys/nfsclient/nfs_vnops.c in FreeBSD.
Diff from rwatson@freebsd.org
OK blambert@, "no objections" krw@
tested by many;
-rw-r--r-- | sys/nfs/nfs_vnops.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index ba5ab6612f7..f6ee534a54e 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vnops.c,v 1.81 2008/04/14 13:46:13 blambert Exp $ */ +/* $OpenBSD: nfs_vnops.c,v 1.82 2008/04/22 20:59:37 thib Exp $ */ /* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */ /* @@ -1611,11 +1611,6 @@ nfsmout: VN_KNOTE(vp, NOTE_LINK); VN_KNOTE(dvp, NOTE_WRITE); vput(dvp); - /* - * Kludge: Map EEXIST => 0 assuming that it is a reply to a retry. - */ - if (error == EEXIST) - error = 0; return (error); } @@ -1674,11 +1669,6 @@ nfsmout: VTONFS(dvp)->n_attrstamp = 0; VN_KNOTE(dvp, NOTE_WRITE); vrele(dvp); - /* - * Kludge: Map EEXIST => 0 assuming that it is a reply to a retry. - */ - if (error == EEXIST) - error = 0; return (error); } @@ -1733,15 +1723,8 @@ nfsmout: VTONFS(dvp)->n_flag |= NMODIFIED; if (!wccflag) VTONFS(dvp)->n_attrstamp = 0; - /* - * Kludge: Map EEXIST => 0 assuming that you have a reply to a retry - * if we can succeed in looking up the directory. - */ - if (error == EEXIST || (!error && !gotvp)) { - if (newvp) { - vrele(newvp); - newvp = (struct vnode *)0; - } + + if (error == 0 && newvp == NULL) { error = nfs_lookitup(dvp, cnp->cn_nameptr, len, cnp->cn_cred, cnp->cn_proc, &np); if (!error) { |