- switch (cacherep) {
- case RC_DOIT:
- if (nd && (nd->nd_vers == NFS_VER3))
- procrastinate = nfsrv_wg_delay_v3;
- else
- procrastinate = nfsrv_wg_delay;
- lck_rw_lock_shared(&nfsrv_export_rwlock);
- context.vc_ucred = NULL;
- if (writes_todo || ((nd->nd_procnum == NFSPROC_WRITE) && (procrastinate > 0)))
- error = nfsrv_writegather(&nd, slp, &context, &mrep);
- else
- error = (*(nfsrv_procs[nd->nd_procnum]))(nd, slp, &context, &mrep);
- lck_rw_done(&nfsrv_export_rwlock);
- if (mrep == NULL) {
- /*
- * If this is a stream socket and we are not going
- * to send a reply we better close the connection
- * so the client doesn't hang.
- */
- if (error && slp->ns_sotype == SOCK_STREAM) {
- lck_rw_lock_exclusive(&slp->ns_rwlock);
- nfsrv_zapsock(slp);
- lck_rw_done(&slp->ns_rwlock);
- printf("NFS server: NULL reply from proc = %d error = %d\n",
- nd->nd_procnum, error);
+ switch (cacherep) {
+ case RC_DOIT:
+ if (nd && (nd->nd_vers == NFS_VER3)) {
+ procrastinate = nfsrv_wg_delay_v3;
+ } else {
+ procrastinate = nfsrv_wg_delay;