Lines Matching refs:p

46 static __be32 *nlm_decode_cookie(__be32 *p, struct nlm_cookie *c)  in nlm_decode_cookie()  argument
50 len = ntohl(*p++); in nlm_decode_cookie()
60 memcpy(c->data, p, len); in nlm_decode_cookie()
61 p+=XDR_QUADLEN(len); in nlm_decode_cookie()
70 return p; in nlm_decode_cookie()
74 nlm_encode_cookie(__be32 *p, struct nlm_cookie *c) in nlm_encode_cookie() argument
76 *p++ = htonl(c->len); in nlm_encode_cookie()
77 memcpy(p, c->data, c->len); in nlm_encode_cookie()
78 p+=XDR_QUADLEN(c->len); in nlm_encode_cookie()
79 return p; in nlm_encode_cookie()
83 nlm_decode_fh(__be32 *p, struct nfs_fh *f) in nlm_decode_fh() argument
87 if ((len = ntohl(*p++)) != NFS2_FHSIZE) { in nlm_decode_fh()
94 memcpy(f->data, p, NFS2_FHSIZE); in nlm_decode_fh()
95 return p + XDR_QUADLEN(NFS2_FHSIZE); in nlm_decode_fh()
102 nlm_decode_oh(__be32 *p, struct xdr_netobj *oh) in nlm_decode_oh() argument
104 return xdr_decode_netobj(p, oh); in nlm_decode_oh()
108 nlm_encode_oh(__be32 *p, struct xdr_netobj *oh) in nlm_encode_oh() argument
110 return xdr_encode_netobj(p, oh); in nlm_encode_oh()
114 nlm_decode_lock(__be32 *p, struct nlm_lock *lock) in nlm_decode_lock() argument
119 if (!(p = xdr_decode_string_inplace(p, &lock->caller, in nlm_decode_lock()
122 || !(p = nlm_decode_fh(p, &lock->fh)) in nlm_decode_lock()
123 || !(p = nlm_decode_oh(p, &lock->oh))) in nlm_decode_lock()
125 lock->svid = ntohl(*p++); in nlm_decode_lock()
132 start = ntohl(*p++); in nlm_decode_lock()
133 len = ntohl(*p++); in nlm_decode_lock()
142 return p; in nlm_decode_lock()
149 nlm_encode_testres(__be32 *p, struct nlm_res *resp) in nlm_encode_testres() argument
153 if (!(p = nlm_encode_cookie(p, &resp->cookie))) in nlm_encode_testres()
155 *p++ = resp->status; in nlm_encode_testres()
160 *p++ = (fl->fl_type == F_RDLCK)? xdr_zero : xdr_one; in nlm_encode_testres()
161 *p++ = htonl(resp->lock.svid); in nlm_encode_testres()
164 if (!(p = xdr_encode_netobj(p, &resp->lock.oh))) in nlm_encode_testres()
173 *p++ = htonl(start); in nlm_encode_testres()
174 *p++ = htonl(len); in nlm_encode_testres()
177 return p; in nlm_encode_testres()
185 nlmsvc_decode_testargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) in nlmsvc_decode_testargs() argument
189 if (!(p = nlm_decode_cookie(p, &argp->cookie))) in nlmsvc_decode_testargs()
192 exclusive = ntohl(*p++); in nlmsvc_decode_testargs()
193 if (!(p = nlm_decode_lock(p, &argp->lock))) in nlmsvc_decode_testargs()
198 return xdr_argsize_check(rqstp, p); in nlmsvc_decode_testargs()
202 nlmsvc_encode_testres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp) in nlmsvc_encode_testres() argument
204 if (!(p = nlm_encode_testres(p, resp))) in nlmsvc_encode_testres()
206 return xdr_ressize_check(rqstp, p); in nlmsvc_encode_testres()
210 nlmsvc_decode_lockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) in nlmsvc_decode_lockargs() argument
214 if (!(p = nlm_decode_cookie(p, &argp->cookie))) in nlmsvc_decode_lockargs()
216 argp->block = ntohl(*p++); in nlmsvc_decode_lockargs()
217 exclusive = ntohl(*p++); in nlmsvc_decode_lockargs()
218 if (!(p = nlm_decode_lock(p, &argp->lock))) in nlmsvc_decode_lockargs()
222 argp->reclaim = ntohl(*p++); in nlmsvc_decode_lockargs()
223 argp->state = ntohl(*p++); in nlmsvc_decode_lockargs()
226 return xdr_argsize_check(rqstp, p); in nlmsvc_decode_lockargs()
230 nlmsvc_decode_cancargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) in nlmsvc_decode_cancargs() argument
234 if (!(p = nlm_decode_cookie(p, &argp->cookie))) in nlmsvc_decode_cancargs()
236 argp->block = ntohl(*p++); in nlmsvc_decode_cancargs()
237 exclusive = ntohl(*p++); in nlmsvc_decode_cancargs()
238 if (!(p = nlm_decode_lock(p, &argp->lock))) in nlmsvc_decode_cancargs()
242 return xdr_argsize_check(rqstp, p); in nlmsvc_decode_cancargs()
246 nlmsvc_decode_unlockargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) in nlmsvc_decode_unlockargs() argument
248 if (!(p = nlm_decode_cookie(p, &argp->cookie)) in nlmsvc_decode_unlockargs()
249 || !(p = nlm_decode_lock(p, &argp->lock))) in nlmsvc_decode_unlockargs()
252 return xdr_argsize_check(rqstp, p); in nlmsvc_decode_unlockargs()
256 nlmsvc_decode_shareargs(struct svc_rqst *rqstp, __be32 *p, nlm_args *argp) in nlmsvc_decode_shareargs() argument
265 if (!(p = nlm_decode_cookie(p, &argp->cookie)) in nlmsvc_decode_shareargs()
266 || !(p = xdr_decode_string_inplace(p, &lock->caller, in nlmsvc_decode_shareargs()
268 || !(p = nlm_decode_fh(p, &lock->fh)) in nlmsvc_decode_shareargs()
269 || !(p = nlm_decode_oh(p, &lock->oh))) in nlmsvc_decode_shareargs()
271 argp->fsm_mode = ntohl(*p++); in nlmsvc_decode_shareargs()
272 argp->fsm_access = ntohl(*p++); in nlmsvc_decode_shareargs()
273 return xdr_argsize_check(rqstp, p); in nlmsvc_decode_shareargs()
277 nlmsvc_encode_shareres(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp) in nlmsvc_encode_shareres() argument
279 if (!(p = nlm_encode_cookie(p, &resp->cookie))) in nlmsvc_encode_shareres()
281 *p++ = resp->status; in nlmsvc_encode_shareres()
282 *p++ = xdr_zero; /* sequence argument */ in nlmsvc_encode_shareres()
283 return xdr_ressize_check(rqstp, p); in nlmsvc_encode_shareres()
287 nlmsvc_encode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp) in nlmsvc_encode_res() argument
289 if (!(p = nlm_encode_cookie(p, &resp->cookie))) in nlmsvc_encode_res()
291 *p++ = resp->status; in nlmsvc_encode_res()
292 return xdr_ressize_check(rqstp, p); in nlmsvc_encode_res()
296 nlmsvc_decode_notify(struct svc_rqst *rqstp, __be32 *p, struct nlm_args *argp) in nlmsvc_decode_notify() argument
300 if (!(p = xdr_decode_string_inplace(p, &lock->caller, in nlmsvc_decode_notify()
303 argp->state = ntohl(*p++); in nlmsvc_decode_notify()
304 return xdr_argsize_check(rqstp, p); in nlmsvc_decode_notify()
308 nlmsvc_decode_reboot(struct svc_rqst *rqstp, __be32 *p, struct nlm_reboot *argp) in nlmsvc_decode_reboot() argument
310 if (!(p = xdr_decode_string_inplace(p, &argp->mon, &argp->len, SM_MAXSTRLEN))) in nlmsvc_decode_reboot()
312 argp->state = ntohl(*p++); in nlmsvc_decode_reboot()
313 memcpy(&argp->priv.data, p, sizeof(argp->priv.data)); in nlmsvc_decode_reboot()
314 p += XDR_QUADLEN(SM_PRIV_SIZE); in nlmsvc_decode_reboot()
315 return xdr_argsize_check(rqstp, p); in nlmsvc_decode_reboot()
319 nlmsvc_decode_res(struct svc_rqst *rqstp, __be32 *p, struct nlm_res *resp) in nlmsvc_decode_res() argument
321 if (!(p = nlm_decode_cookie(p, &resp->cookie))) in nlmsvc_decode_res()
323 resp->status = *p++; in nlmsvc_decode_res()
324 return xdr_argsize_check(rqstp, p); in nlmsvc_decode_res()
328 nlmsvc_decode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy) in nlmsvc_decode_void() argument
330 return xdr_argsize_check(rqstp, p); in nlmsvc_decode_void()
334 nlmsvc_encode_void(struct svc_rqst *rqstp, __be32 *p, void *dummy) in nlmsvc_encode_void() argument
336 return xdr_ressize_check(rqstp, p); in nlmsvc_encode_void()