- if (error) {
- nd->nd_repstat = error;
- error = nfsrv_rephead(nd, slp, &nmrep, NFSX_WCCDATA(nd->nd_vers));
- if (!error && (nd->nd_vers == NFS_VER3)) {
- nfsm_chain_add_wcc_data(error, nd, &nmrep,
- preattrerr, &preattr, postattrerr, &postattr);
+ if (error) {
+ nd->nd_repstat = error;
+ error = nfsrv_rephead(nd, slp, &nmrep, NFSX_WCCDATA(nd->nd_vers));
+ if (!error && (nd->nd_vers == NFS_VER3)) {
+ nfsm_chain_add_wcc_data(error, nd, &nmrep,
+ preattrerr, &preattr, postattrerr, &postattr);
+ }
+ } else {
+ nd->nd_repstat = error;
+ error = nfsrv_rephead(nd, slp, &nmrep, NFSX_PREOPATTR(nd->nd_vers) +
+ NFSX_POSTOPORFATTR(nd->nd_vers) + 2 * NFSX_UNSIGNED +
+ NFSX_WRITEVERF(nd->nd_vers));
+ if (!error && (nd->nd_vers == NFS_VER3)) {
+ nfsm_chain_add_wcc_data(error, nd, &nmrep,
+ preattrerr, &preattr, postattrerr, &postattr);
+ nfsm_chain_add_32(error, &nmrep, nd->nd_len);
+ nfsm_chain_add_32(error, &nmrep, nd->nd_stable);
+ /* write verifier */
+ nfsm_chain_add_32(error, &nmrep, nx->nx_exptime.tv_sec);
+ nfsm_chain_add_32(error, &nmrep, nx->nx_exptime.tv_usec);
+ } else if (!error) {
+ error = nfsm_chain_add_fattr(nd, &nmrep, &postattr);
+ }