Lines Matching refs:p
46 nlm4_decode_cookie(__be32 *p, struct nlm_cookie *c) in nlm4_decode_cookie() argument
50 len = ntohl(*p++); in nlm4_decode_cookie()
60 memcpy(c->data, p, len); in nlm4_decode_cookie()
61 p+=XDR_QUADLEN(len); in nlm4_decode_cookie()
70 return p; in nlm4_decode_cookie()
74 nlm4_encode_cookie(__be32 *p, struct nlm_cookie *c) in nlm4_encode_cookie() argument
76 *p++ = htonl(c->len); in nlm4_encode_cookie()
77 memcpy(p, c->data, c->len); in nlm4_encode_cookie()
78 p+=XDR_QUADLEN(c->len); in nlm4_encode_cookie()
79 return p; in nlm4_encode_cookie()
83 nlm4_decode_fh(__be32 *p, struct nfs_fh *f) in nlm4_decode_fh() argument
86 f->size = ntohl(*p++); in nlm4_decode_fh()
92 memcpy(f->data, p, f->size); in nlm4_decode_fh()
93 return p + XDR_QUADLEN(f->size); in nlm4_decode_fh()
100 nlm4_decode_oh(__be32 *p, struct xdr_netobj *oh) in nlm4_decode_oh() argument
102 return xdr_decode_netobj(p, oh); in nlm4_decode_oh()
106 nlm4_decode_lock(__be32 *p, struct nlm_lock *lock) in nlm4_decode_lock() argument
112 if (!(p = xdr_decode_string_inplace(p, &lock->caller, in nlm4_decode_lock()
114 || !(p = nlm4_decode_fh(p, &lock->fh)) in nlm4_decode_lock()
115 || !(p = nlm4_decode_oh(p, &lock->oh))) in nlm4_decode_lock()
117 lock->svid = ntohl(*p++); in nlm4_decode_lock()
124 p = xdr_decode_hyper(p, &start); in nlm4_decode_lock()
125 p = xdr_decode_hyper(p, &len); in nlm4_decode_lock()
134 return p; in nlm4_decode_lock()
141 nlm4_encode_testres(__be32 *p, struct nlm_res *resp) in nlm4_encode_testres() argument
145 dprintk("xdr: before encode_testres (p %p resp %p)\n", p, resp); in nlm4_encode_testres()
146 if (!(p = nlm4_encode_cookie(p, &resp->cookie))) in nlm4_encode_testres()
148 *p++ = resp->status; in nlm4_encode_testres()
153 *p++ = (fl->fl_type == F_RDLCK)? xdr_zero : xdr_one; in nlm4_encode_testres()
154 *p++ = htonl(resp->lock.svid); in nlm4_encode_testres()
157 if (!(p = xdr_encode_netobj(p, &resp->lock.oh))) in nlm4_encode_testres()
166 p = xdr_encode_hyper(p, start); in nlm4_encode_testres()
167 p = xdr_encode_hyper(p, len); in nlm4_encode_testres()
173 dprintk("xdr: after encode_testres (p %p resp %p)\n", p, resp); in nlm4_encode_testres()
174 return p; in nlm4_encode_testres()
182 nlm4svc_decode_testargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) in nlm4svc_decode_testargs() argument
186 if (!(p = nlm4_decode_cookie(p, &argp->cookie))) in nlm4svc_decode_testargs()
189 exclusive = ntohl(*p++); in nlm4svc_decode_testargs()
190 if (!(p = nlm4_decode_lock(p, &argp->lock))) in nlm4svc_decode_testargs()
195 return xdr_argsize_check(rqstp, p); in nlm4svc_decode_testargs()
199 nlm4svc_encode_testres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp) in nlm4svc_encode_testres() argument
201 if (!(p = nlm4_encode_testres(p, resp))) in nlm4svc_encode_testres()
203 return xdr_ressize_check(rqstp, p); in nlm4svc_encode_testres()
207 nlm4svc_decode_lockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) in nlm4svc_decode_lockargs() argument
211 if (!(p = nlm4_decode_cookie(p, &argp->cookie))) in nlm4svc_decode_lockargs()
213 argp->block = ntohl(*p++); in nlm4svc_decode_lockargs()
214 exclusive = ntohl(*p++); in nlm4svc_decode_lockargs()
215 if (!(p = nlm4_decode_lock(p, &argp->lock))) in nlm4svc_decode_lockargs()
219 argp->reclaim = ntohl(*p++); in nlm4svc_decode_lockargs()
220 argp->state = ntohl(*p++); in nlm4svc_decode_lockargs()
223 return xdr_argsize_check(rqstp, p); in nlm4svc_decode_lockargs()
227 nlm4svc_decode_cancargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) in nlm4svc_decode_cancargs() argument
231 if (!(p = nlm4_decode_cookie(p, &argp->cookie))) in nlm4svc_decode_cancargs()
233 argp->block = ntohl(*p++); in nlm4svc_decode_cancargs()
234 exclusive = ntohl(*p++); in nlm4svc_decode_cancargs()
235 if (!(p = nlm4_decode_lock(p, &argp->lock))) in nlm4svc_decode_cancargs()
239 return xdr_argsize_check(rqstp, p); in nlm4svc_decode_cancargs()
243 nlm4svc_decode_unlockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) in nlm4svc_decode_unlockargs() argument
245 if (!(p = nlm4_decode_cookie(p, &argp->cookie)) in nlm4svc_decode_unlockargs()
246 || !(p = nlm4_decode_lock(p, &argp->lock))) in nlm4svc_decode_unlockargs()
249 return xdr_argsize_check(rqstp, p); in nlm4svc_decode_unlockargs()
253 nlm4svc_decode_shareargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) in nlm4svc_decode_shareargs() argument
262 if (!(p = nlm4_decode_cookie(p, &argp->cookie)) in nlm4svc_decode_shareargs()
263 || !(p = xdr_decode_string_inplace(p, &lock->caller, in nlm4svc_decode_shareargs()
265 || !(p = nlm4_decode_fh(p, &lock->fh)) in nlm4svc_decode_shareargs()
266 || !(p = nlm4_decode_oh(p, &lock->oh))) in nlm4svc_decode_shareargs()
268 argp->fsm_mode = ntohl(*p++); in nlm4svc_decode_shareargs()
269 argp->fsm_access = ntohl(*p++); in nlm4svc_decode_shareargs()
270 return xdr_argsize_check(rqstp, p); in nlm4svc_decode_shareargs()
274 nlm4svc_encode_shareres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp) in nlm4svc_encode_shareres() argument
276 if (!(p = nlm4_encode_cookie(p, &resp->cookie))) in nlm4svc_encode_shareres()
278 *p++ = resp->status; in nlm4svc_encode_shareres()
279 *p++ = xdr_zero; /* sequence argument */ in nlm4svc_encode_shareres()
280 return xdr_ressize_check(rqstp, p); in nlm4svc_encode_shareres()
284 nlm4svc_encode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp) in nlm4svc_encode_res() argument
286 if (!(p = nlm4_encode_cookie(p, &resp->cookie))) in nlm4svc_encode_res()
288 *p++ = resp->status; in nlm4svc_encode_res()
289 return xdr_ressize_check(rqstp, p); in nlm4svc_encode_res()
293 nlm4svc_decode_notify(struct svc_rqst *rqstp, __be32 *p, struct nlm_args *argp) in nlm4svc_decode_notify() argument
297 if (!(p = xdr_decode_string_inplace(p, &lock->caller, in nlm4svc_decode_notify()
300 argp->state = ntohl(*p++); in nlm4svc_decode_notify()
301 return xdr_argsize_check(rqstp, p); in nlm4svc_decode_notify()
305 nlm4svc_decode_reboot(struct svc_rqst *rqstp, __be32 *p, struct nlm_reboot *argp) in nlm4svc_decode_reboot() argument
307 if (!(p = xdr_decode_string_inplace(p, &argp->mon, &argp->len, SM_MAXSTRLEN))) in nlm4svc_decode_reboot()
309 argp->state = ntohl(*p++); in nlm4svc_decode_reboot()
310 memcpy(&argp->priv.data, p, sizeof(argp->priv.data)); in nlm4svc_decode_reboot()
311 p += XDR_QUADLEN(SM_PRIV_SIZE); in nlm4svc_decode_reboot()
312 return xdr_argsize_check(rqstp, p); in nlm4svc_decode_reboot()
316 nlm4svc_decode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp) in nlm4svc_decode_res() argument
318 if (!(p = nlm4_decode_cookie(p, &resp->cookie))) in nlm4svc_decode_res()
320 resp->status = *p++; in nlm4svc_decode_res()
321 return xdr_argsize_check(rqstp, p); in nlm4svc_decode_res()
325 nlm4svc_decode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy) in nlm4svc_decode_void() argument
327 return xdr_argsize_check(rqstp, p); in nlm4svc_decode_void()
331 nlm4svc_encode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy) in nlm4svc_encode_void() argument
333 return xdr_ressize_check(rqstp, p); in nlm4svc_encode_void()