summaryrefslogtreecommitdiffstats
path: root/sys/nfs4client/nfs4_subs.c
diff options
context:
space:
mode:
authorrees <rees@FreeBSD.org>2004-02-27 19:37:43 +0000
committerrees <rees@FreeBSD.org>2004-02-27 19:37:43 +0000
commit108fca056b39835d3cd01b13e983771920013184 (patch)
tree5367f6ef23a6fc409270d072b51ea77d8121749d /sys/nfs4client/nfs4_subs.c
parent74ac2d2c4d1597c12027af700def585763cff043 (diff)
downloadFreeBSD-src-108fca056b39835d3cd01b13e983771920013184.zip
FreeBSD-src-108fca056b39835d3cd01b13e983771920013184.tar.gz
NFSv4 fixes from Connectathon 2004:
remove unused pid field of file context struct map nfs4 error codes to errnos eliminate redundant code from nfs4_request use zero stateid on setattr that doesn't set file size use same clientid on all mounts until reboot invalidate dirty bufs in nfs4_close, to play it safe open file for writing if truncating and it's not already open Approved by: alfred
Diffstat (limited to 'sys/nfs4client/nfs4_subs.c')
-rw-r--r--sys/nfs4client/nfs4_subs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/nfs4client/nfs4_subs.c b/sys/nfs4client/nfs4_subs.c
index c28c73b..9cf7b0e 100644
--- a/sys/nfs4client/nfs4_subs.c
+++ b/sys/nfs4client/nfs4_subs.c
@@ -421,10 +421,11 @@ nfsm_v4build_setattr_xx(struct nfs4_compound *cp, struct vattr *vap,
struct nfs4_fctx *fcp, struct mbuf **mb, caddr_t *bpos)
{
int error;
+ static char zero_stateid[NFSX_V4STATEID];
nfsm_buildf_xx(mb, bpos, "uo",
NFSV4OP_SETATTR,
- NFSX_V4STATEID, fcp->stateid);
+ NFSX_V4STATEID, fcp ? fcp->stateid : zero_stateid);
error = nfsm_v4build_attrs_xx(vap, mb, bpos);
if (error == 0)
cp->req_nops++;
OpenPOWER on IntegriCloud