Lines Matching refs:rqstp

43 #define	cast_status(status) (cast_to_nlm(status, rqstp->rq_vers))
52 nlmsvc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,
66 if (!(host = nlmsvc_lookup_host(rqstp, lock->caller, lock->len))
73 error = cast_status(nlm_lookup_file(rqstp, &file, lock));
105 nlmsvc_proc_null(struct svc_rqst *rqstp)
115 __nlmsvc_proc_test(struct svc_rqst *rqstp, struct nlm_res *resp)
117 struct nlm_args *argp = rqstp->rq_argp;
127 if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))
133 resp->status = cast_status(nlmsvc_testlock(rqstp, file, host, &argp->lock, &resp->lock, &resp->cookie));
138 ntohl(resp->status), rqstp->rq_vers);
147 nlmsvc_proc_test(struct svc_rqst *rqstp)
149 return __nlmsvc_proc_test(rqstp, rqstp->rq_resp);
153 __nlmsvc_proc_lock(struct svc_rqst *rqstp, struct nlm_res *resp)
155 struct nlm_args *argp = rqstp->rq_argp;
165 if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))
181 resp->status = cast_status(nlmsvc_lock(rqstp, file, host, &argp->lock,
196 nlmsvc_proc_lock(struct svc_rqst *rqstp)
198 return __nlmsvc_proc_lock(rqstp, rqstp->rq_resp);
202 __nlmsvc_proc_cancel(struct svc_rqst *rqstp, struct nlm_res *resp)
204 struct nlm_args *argp = rqstp->rq_argp;
207 struct net *net = SVC_NET(rqstp);
220 if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))
234 nlmsvc_proc_cancel(struct svc_rqst *rqstp)
236 return __nlmsvc_proc_cancel(rqstp, rqstp->rq_resp);
243 __nlmsvc_proc_unlock(struct svc_rqst *rqstp, struct nlm_res *resp)
245 struct nlm_args *argp = rqstp->rq_argp;
248 struct net *net = SVC_NET(rqstp);
261 if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))
275 nlmsvc_proc_unlock(struct svc_rqst *rqstp)
277 return __nlmsvc_proc_unlock(rqstp, rqstp->rq_resp);
285 __nlmsvc_proc_granted(struct svc_rqst *rqstp, struct nlm_res *resp)
287 struct nlm_args *argp = rqstp->rq_argp;
292 resp->status = nlmclnt_grant(svc_addr(rqstp), &argp->lock);
298 nlmsvc_proc_granted(struct svc_rqst *rqstp)
300 return __nlmsvc_proc_granted(rqstp, rqstp->rq_resp);
333 static __be32 nlmsvc_callback(struct svc_rqst *rqstp, u32 proc,
336 struct nlm_args *argp = rqstp->rq_argp;
341 host = nlmsvc_lookup_host(rqstp,
352 stat = func(rqstp, &call->a_res);
364 static __be32 nlmsvc_proc_test_msg(struct svc_rqst *rqstp)
367 return nlmsvc_callback(rqstp, NLMPROC_TEST_RES, __nlmsvc_proc_test);
370 static __be32 nlmsvc_proc_lock_msg(struct svc_rqst *rqstp)
373 return nlmsvc_callback(rqstp, NLMPROC_LOCK_RES, __nlmsvc_proc_lock);
376 static __be32 nlmsvc_proc_cancel_msg(struct svc_rqst *rqstp)
379 return nlmsvc_callback(rqstp, NLMPROC_CANCEL_RES, __nlmsvc_proc_cancel);
383 nlmsvc_proc_unlock_msg(struct svc_rqst *rqstp)
386 return nlmsvc_callback(rqstp, NLMPROC_UNLOCK_RES, __nlmsvc_proc_unlock);
390 nlmsvc_proc_granted_msg(struct svc_rqst *rqstp)
393 return nlmsvc_callback(rqstp, NLMPROC_GRANTED_RES, __nlmsvc_proc_granted);
400 nlmsvc_proc_share(struct svc_rqst *rqstp)
402 struct nlm_args *argp = rqstp->rq_argp;
403 struct nlm_res *resp = rqstp->rq_resp;
412 if (locks_in_grace(SVC_NET(rqstp)) && !argp->reclaim) {
418 if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))
435 nlmsvc_proc_unshare(struct svc_rqst *rqstp)
437 struct nlm_args *argp = rqstp->rq_argp;
438 struct nlm_res *resp = rqstp->rq_resp;
447 if (locks_in_grace(SVC_NET(rqstp))) {
453 if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))
470 nlmsvc_proc_nm_lock(struct svc_rqst *rqstp)
472 struct nlm_args *argp = rqstp->rq_argp;
477 return nlmsvc_proc_lock(rqstp);
484 nlmsvc_proc_free_all(struct svc_rqst *rqstp)
486 struct nlm_args *argp = rqstp->rq_argp;
490 if (nlmsvc_retrieve_args(rqstp, argp, &host, NULL))
502 nlmsvc_proc_sm_notify(struct svc_rqst *rqstp)
504 struct nlm_reboot *argp = rqstp->rq_argp;
508 if (!nlm_privileged_requester(rqstp)) {
511 svc_print_addr(rqstp, buf, sizeof(buf)));
515 nlm_host_rebooted(SVC_NET(rqstp), argp);
523 nlmsvc_proc_granted_res(struct svc_rqst *rqstp)
525 struct nlm_res *argp = rqstp->rq_argp;
537 nlmsvc_proc_unused(struct svc_rqst *rqstp)