• Home
  • Raw
  • Download

Lines Matching refs:p

45 static __be32 *nlm_decode_cookie(__be32 *p, struct nlm_cookie *c)  in nlm_decode_cookie()  argument
49 len = ntohl(*p++); in nlm_decode_cookie()
59 memcpy(c->data, p, len); in nlm_decode_cookie()
60 p+=XDR_QUADLEN(len); in nlm_decode_cookie()
69 return p; in nlm_decode_cookie()
73 nlm_encode_cookie(__be32 *p, struct nlm_cookie *c) in nlm_encode_cookie() argument
75 *p++ = htonl(c->len); in nlm_encode_cookie()
76 memcpy(p, c->data, c->len); in nlm_encode_cookie()
77 p+=XDR_QUADLEN(c->len); in nlm_encode_cookie()
78 return p; in nlm_encode_cookie()
82 nlm_decode_fh(__be32 *p, struct nfs_fh *f) in nlm_decode_fh() argument
86 if ((len = ntohl(*p++)) != NFS2_FHSIZE) { in nlm_decode_fh()
93 memcpy(f->data, p, NFS2_FHSIZE); in nlm_decode_fh()
94 return p + XDR_QUADLEN(NFS2_FHSIZE); in nlm_decode_fh()
98 nlm_encode_fh(__be32 *p, struct nfs_fh *f) in nlm_encode_fh() argument
100 *p++ = htonl(NFS2_FHSIZE); in nlm_encode_fh()
101 memcpy(p, f->data, NFS2_FHSIZE); in nlm_encode_fh()
102 return p + XDR_QUADLEN(NFS2_FHSIZE); in nlm_encode_fh()
109 nlm_decode_oh(__be32 *p, struct xdr_netobj *oh) in nlm_decode_oh() argument
111 return xdr_decode_netobj(p, oh); in nlm_decode_oh()
115 nlm_encode_oh(__be32 *p, struct xdr_netobj *oh) in nlm_encode_oh() argument
117 return xdr_encode_netobj(p, oh); in nlm_encode_oh()
121 nlm_decode_lock(__be32 *p, struct nlm_lock *lock) in nlm_decode_lock() argument
126 if (!(p = xdr_decode_string_inplace(p, &lock->caller, in nlm_decode_lock()
129 || !(p = nlm_decode_fh(p, &lock->fh)) in nlm_decode_lock()
130 || !(p = nlm_decode_oh(p, &lock->oh))) in nlm_decode_lock()
132 lock->svid = ntohl(*p++); in nlm_decode_lock()
139 start = ntohl(*p++); in nlm_decode_lock()
140 len = ntohl(*p++); in nlm_decode_lock()
149 return p; in nlm_decode_lock()
156 nlm_encode_lock(__be32 *p, struct nlm_lock *lock) in nlm_encode_lock() argument
161 if (!(p = xdr_encode_string(p, lock->caller)) in nlm_encode_lock()
162 || !(p = nlm_encode_fh(p, &lock->fh)) in nlm_encode_lock()
163 || !(p = nlm_encode_oh(p, &lock->oh))) in nlm_encode_lock()
176 *p++ = htonl(lock->svid); in nlm_encode_lock()
177 *p++ = htonl(start); in nlm_encode_lock()
178 *p++ = htonl(len); in nlm_encode_lock()
180 return p; in nlm_encode_lock()
187 nlm_encode_testres(__be32 *p, struct nlm_res *resp) in nlm_encode_testres() argument
191 if (!(p = nlm_encode_cookie(p, &resp->cookie))) in nlm_encode_testres()
193 *p++ = resp->status; in nlm_encode_testres()
198 *p++ = (fl->fl_type == F_RDLCK)? xdr_zero : xdr_one; in nlm_encode_testres()
199 *p++ = htonl(resp->lock.svid); in nlm_encode_testres()
202 if (!(p = xdr_encode_netobj(p, &resp->lock.oh))) in nlm_encode_testres()
211 *p++ = htonl(start); in nlm_encode_testres()
212 *p++ = htonl(len); in nlm_encode_testres()
215 return p; in nlm_encode_testres()
223 nlmsvc_decode_testargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) in nlmsvc_decode_testargs() argument
227 if (!(p = nlm_decode_cookie(p, &argp->cookie))) in nlmsvc_decode_testargs()
230 exclusive = ntohl(*p++); in nlmsvc_decode_testargs()
231 if (!(p = nlm_decode_lock(p, &argp->lock))) in nlmsvc_decode_testargs()
236 return xdr_argsize_check(rqstp, p); in nlmsvc_decode_testargs()
240 nlmsvc_encode_testres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp) in nlmsvc_encode_testres() argument
242 if (!(p = nlm_encode_testres(p, resp))) in nlmsvc_encode_testres()
244 return xdr_ressize_check(rqstp, p); in nlmsvc_encode_testres()
248 nlmsvc_decode_lockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) in nlmsvc_decode_lockargs() argument
252 if (!(p = nlm_decode_cookie(p, &argp->cookie))) in nlmsvc_decode_lockargs()
254 argp->block = ntohl(*p++); in nlmsvc_decode_lockargs()
255 exclusive = ntohl(*p++); in nlmsvc_decode_lockargs()
256 if (!(p = nlm_decode_lock(p, &argp->lock))) in nlmsvc_decode_lockargs()
260 argp->reclaim = ntohl(*p++); in nlmsvc_decode_lockargs()
261 argp->state = ntohl(*p++); in nlmsvc_decode_lockargs()
264 return xdr_argsize_check(rqstp, p); in nlmsvc_decode_lockargs()
268 nlmsvc_decode_cancargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) in nlmsvc_decode_cancargs() argument
272 if (!(p = nlm_decode_cookie(p, &argp->cookie))) in nlmsvc_decode_cancargs()
274 argp->block = ntohl(*p++); in nlmsvc_decode_cancargs()
275 exclusive = ntohl(*p++); in nlmsvc_decode_cancargs()
276 if (!(p = nlm_decode_lock(p, &argp->lock))) in nlmsvc_decode_cancargs()
280 return xdr_argsize_check(rqstp, p); in nlmsvc_decode_cancargs()
284 nlmsvc_decode_unlockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) in nlmsvc_decode_unlockargs() argument
286 if (!(p = nlm_decode_cookie(p, &argp->cookie)) in nlmsvc_decode_unlockargs()
287 || !(p = nlm_decode_lock(p, &argp->lock))) in nlmsvc_decode_unlockargs()
290 return xdr_argsize_check(rqstp, p); in nlmsvc_decode_unlockargs()
294 nlmsvc_decode_shareargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) in nlmsvc_decode_shareargs() argument
303 if (!(p = nlm_decode_cookie(p, &argp->cookie)) in nlmsvc_decode_shareargs()
304 || !(p = xdr_decode_string_inplace(p, &lock->caller, in nlmsvc_decode_shareargs()
306 || !(p = nlm_decode_fh(p, &lock->fh)) in nlmsvc_decode_shareargs()
307 || !(p = nlm_decode_oh(p, &lock->oh))) in nlmsvc_decode_shareargs()
309 argp->fsm_mode = ntohl(*p++); in nlmsvc_decode_shareargs()
310 argp->fsm_access = ntohl(*p++); in nlmsvc_decode_shareargs()
311 return xdr_argsize_check(rqstp, p); in nlmsvc_decode_shareargs()
315 nlmsvc_encode_shareres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp) in nlmsvc_encode_shareres() argument
317 if (!(p = nlm_encode_cookie(p, &resp->cookie))) in nlmsvc_encode_shareres()
319 *p++ = resp->status; in nlmsvc_encode_shareres()
320 *p++ = xdr_zero; /* sequence argument */ in nlmsvc_encode_shareres()
321 return xdr_ressize_check(rqstp, p); in nlmsvc_encode_shareres()
325 nlmsvc_encode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp) in nlmsvc_encode_res() argument
327 if (!(p = nlm_encode_cookie(p, &resp->cookie))) in nlmsvc_encode_res()
329 *p++ = resp->status; in nlmsvc_encode_res()
330 return xdr_ressize_check(rqstp, p); in nlmsvc_encode_res()
334 nlmsvc_decode_notify(struct svc_rqst *rqstp, __be32 *p, struct nlm_args *argp) in nlmsvc_decode_notify() argument
338 if (!(p = xdr_decode_string_inplace(p, &lock->caller, in nlmsvc_decode_notify()
341 argp->state = ntohl(*p++); in nlmsvc_decode_notify()
342 return xdr_argsize_check(rqstp, p); in nlmsvc_decode_notify()
346 nlmsvc_decode_reboot(struct svc_rqst *rqstp, __be32 *p, struct nlm_reboot *argp) in nlmsvc_decode_reboot() argument
348 if (!(p = xdr_decode_string_inplace(p, &argp->mon, &argp->len, SM_MAXSTRLEN))) in nlmsvc_decode_reboot()
350 argp->state = ntohl(*p++); in nlmsvc_decode_reboot()
351 memcpy(&argp->priv.data, p, sizeof(argp->priv.data)); in nlmsvc_decode_reboot()
352 p += XDR_QUADLEN(SM_PRIV_SIZE); in nlmsvc_decode_reboot()
353 return xdr_argsize_check(rqstp, p); in nlmsvc_decode_reboot()
357 nlmsvc_decode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp) in nlmsvc_decode_res() argument
359 if (!(p = nlm_decode_cookie(p, &resp->cookie))) in nlmsvc_decode_res()
361 resp->status = *p++; in nlmsvc_decode_res()
362 return xdr_argsize_check(rqstp, p); in nlmsvc_decode_res()
366 nlmsvc_decode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy) in nlmsvc_decode_void() argument
368 return xdr_argsize_check(rqstp, p); in nlmsvc_decode_void()
372 nlmsvc_encode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy) in nlmsvc_encode_void() argument
374 return xdr_ressize_check(rqstp, p); in nlmsvc_encode_void()
382 nlmclt_decode_void(struct rpc_rqst *req, u32 *p, void *ptr) in nlmclt_decode_void() argument
389 nlmclt_encode_testargs(struct rpc_rqst *req, __be32 *p, nlm_args *argp) in nlmclt_encode_testargs() argument
393 if (!(p = nlm_encode_cookie(p, &argp->cookie))) in nlmclt_encode_testargs()
395 *p++ = (lock->fl.fl_type == F_WRLCK)? xdr_one : xdr_zero; in nlmclt_encode_testargs()
396 if (!(p = nlm_encode_lock(p, lock))) in nlmclt_encode_testargs()
398 req->rq_slen = xdr_adjust_iovec(req->rq_svec, p); in nlmclt_encode_testargs()
403 nlmclt_decode_testres(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp) in nlmclt_decode_testres() argument
405 if (!(p = nlm_decode_cookie(p, &resp->cookie))) in nlmclt_decode_testres()
407 resp->status = *p++; in nlmclt_decode_testres()
415 excl = ntohl(*p++); in nlmclt_decode_testres()
416 resp->lock.svid = ntohl(*p++); in nlmclt_decode_testres()
418 if (!(p = nlm_decode_oh(p, &resp->lock.oh))) in nlmclt_decode_testres()
423 start = ntohl(*p++); in nlmclt_decode_testres()
424 len = ntohl(*p++); in nlmclt_decode_testres()
438 nlmclt_encode_lockargs(struct rpc_rqst *req, __be32 *p, nlm_args *argp) in nlmclt_encode_lockargs() argument
442 if (!(p = nlm_encode_cookie(p, &argp->cookie))) in nlmclt_encode_lockargs()
444 *p++ = argp->block? xdr_one : xdr_zero; in nlmclt_encode_lockargs()
445 *p++ = (lock->fl.fl_type == F_WRLCK)? xdr_one : xdr_zero; in nlmclt_encode_lockargs()
446 if (!(p = nlm_encode_lock(p, lock))) in nlmclt_encode_lockargs()
448 *p++ = argp->reclaim? xdr_one : xdr_zero; in nlmclt_encode_lockargs()
449 *p++ = htonl(argp->state); in nlmclt_encode_lockargs()
450 req->rq_slen = xdr_adjust_iovec(req->rq_svec, p); in nlmclt_encode_lockargs()
455 nlmclt_encode_cancargs(struct rpc_rqst *req, __be32 *p, nlm_args *argp) in nlmclt_encode_cancargs() argument
459 if (!(p = nlm_encode_cookie(p, &argp->cookie))) in nlmclt_encode_cancargs()
461 *p++ = argp->block? xdr_one : xdr_zero; in nlmclt_encode_cancargs()
462 *p++ = (lock->fl.fl_type == F_WRLCK)? xdr_one : xdr_zero; in nlmclt_encode_cancargs()
463 if (!(p = nlm_encode_lock(p, lock))) in nlmclt_encode_cancargs()
465 req->rq_slen = xdr_adjust_iovec(req->rq_svec, p); in nlmclt_encode_cancargs()
470 nlmclt_encode_unlockargs(struct rpc_rqst *req, __be32 *p, nlm_args *argp) in nlmclt_encode_unlockargs() argument
474 if (!(p = nlm_encode_cookie(p, &argp->cookie))) in nlmclt_encode_unlockargs()
476 if (!(p = nlm_encode_lock(p, lock))) in nlmclt_encode_unlockargs()
478 req->rq_slen = xdr_adjust_iovec(req->rq_svec, p); in nlmclt_encode_unlockargs()
483 nlmclt_encode_res(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp) in nlmclt_encode_res() argument
485 if (!(p = nlm_encode_cookie(p, &resp->cookie))) in nlmclt_encode_res()
487 *p++ = resp->status; in nlmclt_encode_res()
488 req->rq_slen = xdr_adjust_iovec(req->rq_svec, p); in nlmclt_encode_res()
493 nlmclt_encode_testres(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp) in nlmclt_encode_testres() argument
495 if (!(p = nlm_encode_testres(p, resp))) in nlmclt_encode_testres()
497 req->rq_slen = xdr_adjust_iovec(req->rq_svec, p); in nlmclt_encode_testres()
502 nlmclt_decode_res(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp) in nlmclt_decode_res() argument
504 if (!(p = nlm_decode_cookie(p, &resp->cookie))) in nlmclt_decode_res()
506 resp->status = *p++; in nlmclt_decode_res()
613 char *p = buf; in nlmdbg_cookie2a() local
620 strcpy(p-3, "..."); in nlmdbg_cookie2a()
623 sprintf(p, "%02x", cookie->data[i]); in nlmdbg_cookie2a()
624 p += 2; in nlmdbg_cookie2a()
627 *p = '\0'; in nlmdbg_cookie2a()