Lines Matching refs:nd

126 extern int (*nfsrv_procs[NFS_NPROCS])(struct nfsrv_descript *nd,
414 struct nameidata nd;
440 NDINIT(&nd, LOOKUP, OP_LOOKUP, FOLLOW | LOCKLEAF | AUDITVNPATH1,
442 error = namei(&nd);
445 nameidone(&nd);
447 vp = nd.ni_vp;
884 struct nfsrv_descript *nd = NULL;
1000 error = nfsrv_dorec(slp, nfsd, &nd);
1022 if (nd) {
1023 nfsm_chain_cleanup(&nd->nd_nmreq);
1024 if (nd->nd_nam2)
1025 mbuf_freem(nd->nd_nam2);
1026 if (IS_VALID_CRED(nd->nd_cr))
1027 kauth_cred_unref(&nd->nd_cr);
1028 if (nd->nd_gss_context)
1029 nfs_gss_svc_ctx_deref(nd->nd_gss_context);
1030 FREE_ZONE(nd, sizeof(*nd), M_NFSRVDESC);
1031 nd = NULL;
1041 if (nd) {
1042 microuptime(&nd->nd_starttime);
1043 if (nd->nd_nam2)
1044 nd->nd_nam = nd->nd_nam2;
1046 nd->nd_nam = slp->ns_nam;
1048 cacherep = nfsrv_getcache(nd, slp, &mrep);
1053 struct sockaddr *saddr = mbuf_data(nd->nd_nam);
1059 if ((port >= IPPORT_RESERVED) && (nd->nd_procnum != NFSPROC_NULL)) {
1060 nd->nd_procnum = NFSPROC_NOOP;
1061 nd->nd_repstat = (NFSERR_AUTHERR | AUTH_TOOWEAK);
1075 if (nd && (nd->nd_vers == NFS_VER3))
1081 if (writes_todo || ((nd->nd_procnum == NFSPROC_WRITE) && (procrastinate > 0)))
1082 error = nfsrv_writegather(&nd, slp, &context, &mrep);
1084 error = (*(nfsrv_procs[nd->nd_procnum]))(nd, slp, &context, &mrep);
1097 nd->nd_procnum, error);
1104 nfsrv_updatecache(nd, FALSE, mrep);
1105 if (nd->nd_nam2) {
1106 mbuf_freem(nd->nd_nam2);
1107 nd->nd_nam2 = NULL;
1111 OSAddAtomic64(1, &nfsstats.srvrpccnt[nd->nd_procnum]);
1112 nfsrv_updatecache(nd, TRUE, mrep);
1116 if (nd->nd_gss_mb != NULL) { // It's RPCSEC_GSS
1120 error = nfs_gss_svc_protect_reply(nd, mrep);
1156 error = nfsrv_send(slp, nd->nd_nam2, m);
1165 if (nd->nd_nam2) {
1166 mbuf_freem(nd->nd_nam2);
1167 nd->nd_nam2 = NULL;
1175 nfsm_chain_cleanup(&nd->nd_nmreq);
1176 if (IS_VALID_CRED(nd->nd_cr))
1177 kauth_cred_unref(&nd->nd_cr);
1178 if (nd->nd_gss_context)
1179 nfs_gss_svc_ctx_deref(nd->nd_gss_context);
1180 FREE_ZONE(nd, sizeof(*nd), M_NFSRVDESC);
1187 mbuf_freem(nd->nd_nam2);
1188 nd->nd_nam2 = NULL;
1192 if (nd) {
1193 nfsm_chain_cleanup(&nd->nd_nmreq);
1194 if (nd->nd_nam2)
1195 mbuf_freem(nd->nd_nam2);
1196 if (IS_VALID_CRED(nd->nd_cr))
1197 kauth_cred_unref(&nd->nd_cr);
1198 if (nd->nd_gss_context)
1199 nfs_gss_svc_ctx_deref(nd->nd_gss_context);
1200 FREE_ZONE(nd, sizeof(*nd), M_NFSRVDESC);
1201 nd = NULL;
1220 nd = NULL;
1223 error = nfsrv_dorec(slp, nfsd, &nd);
1230 if (!nd) {