diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2011-05-25 20:53:08 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2011-05-25 20:53:08 +0000 |
commit | c56a5b0792eddf9a3ae1ceba080955636512970d (patch) | |
tree | 080729487545fbc7add763f2bf5f2ada24195124 /sys/fs/nfsclient/nfs_clvnops.c | |
parent | 8d98f44766c9818e4a5621009674fc63f7c891fb (diff) | |
download | FreeBSD-src-c56a5b0792eddf9a3ae1ceba080955636512970d.zip FreeBSD-src-c56a5b0792eddf9a3ae1ceba080955636512970d.tar.gz |
Fix the new NFS client so that it correctly sets the "must_commit"
argument for a write RPC when it succeeds for the first one and
fails for a subsequent RPC within the same call to the function.
This makes it compatible with the old NFS client for this case.
MFC after: 2 weeks
Diffstat (limited to 'sys/fs/nfsclient/nfs_clvnops.c')
-rw-r--r-- | sys/fs/nfsclient/nfs_clvnops.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 1b08582..355e168 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -1332,19 +1332,9 @@ ncl_writerpc(struct vnode *vp, struct uio *uiop, struct ucred *cred, { struct nfsvattr nfsva; int error = 0, attrflag, ret; - u_char verf[NFSX_VERF]; - struct nfsmount *nmp = VFSTONFS(vp->v_mount); - *must_commit = 0; - error = nfsrpc_write(vp, uiop, iomode, verf, cred, + error = nfsrpc_write(vp, uiop, iomode, must_commit, cred, uiop->uio_td, &nfsva, &attrflag, NULL, called_from_strategy); - NFSLOCKMNT(nmp); - if (!error && NFSHASWRITEVERF(nmp) && - NFSBCMP(verf, nmp->nm_verf, NFSX_VERF)) { - *must_commit = 1; - NFSBCOPY(verf, nmp->nm_verf, NFSX_VERF); - } - NFSUNLOCKMNT(nmp); if (attrflag) { if (VTONFS(vp)->n_flag & ND_NFSV4) ret = nfscl_loadattrcache(&vp, &nfsva, NULL, NULL, 1, |