Lines Matching refs:rqstp
23 nlm4svc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,
36 if (!(host = nlmsvc_lookup_host(rqstp, lock->caller, lock->len))
43 if ((error = nlm_lookup_file(rqstp, &file, &lock->fh)) != 0)
72 nlm4svc_proc_null(struct svc_rqst *rqstp)
82 __nlm4svc_proc_test(struct svc_rqst *rqstp, struct nlm_res *resp)
84 struct nlm_args *argp = rqstp->rq_argp;
93 if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file)))
97 resp->status = nlmsvc_testlock(rqstp, file, host, &argp->lock, &resp->lock, &resp->cookie);
110 nlm4svc_proc_test(struct svc_rqst *rqstp)
112 return __nlm4svc_proc_test(rqstp, rqstp->rq_resp);
116 __nlm4svc_proc_lock(struct svc_rqst *rqstp, struct nlm_res *resp)
118 struct nlm_args *argp = rqstp->rq_argp;
128 if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file)))
144 resp->status = nlmsvc_lock(rqstp, file, host, &argp->lock,
159 nlm4svc_proc_lock(struct svc_rqst *rqstp)
161 return __nlm4svc_proc_lock(rqstp, rqstp->rq_resp);
165 __nlm4svc_proc_cancel(struct svc_rqst *rqstp, struct nlm_res *resp)
167 struct nlm_args *argp = rqstp->rq_argp;
176 if (locks_in_grace(SVC_NET(rqstp))) {
182 if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file)))
186 resp->status = nlmsvc_cancel_blocked(SVC_NET(rqstp), file, &argp->lock);
196 nlm4svc_proc_cancel(struct svc_rqst *rqstp)
198 return __nlm4svc_proc_cancel(rqstp, rqstp->rq_resp);
205 __nlm4svc_proc_unlock(struct svc_rqst *rqstp, struct nlm_res *resp)
207 struct nlm_args *argp = rqstp->rq_argp;
216 if (locks_in_grace(SVC_NET(rqstp))) {
222 if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file)))
226 resp->status = nlmsvc_unlock(SVC_NET(rqstp), file, &argp->lock);
236 nlm4svc_proc_unlock(struct svc_rqst *rqstp)
238 return __nlm4svc_proc_unlock(rqstp, rqstp->rq_resp);
246 __nlm4svc_proc_granted(struct svc_rqst *rqstp, struct nlm_res *resp)
248 struct nlm_args *argp = rqstp->rq_argp;
253 resp->status = nlmclnt_grant(svc_addr(rqstp), &argp->lock);
259 nlm4svc_proc_granted(struct svc_rqst *rqstp)
261 return __nlm4svc_proc_granted(rqstp, rqstp->rq_resp);
288 static __be32 nlm4svc_callback(struct svc_rqst *rqstp, u32 proc,
291 struct nlm_args *argp = rqstp->rq_argp;
296 host = nlmsvc_lookup_host(rqstp,
307 stat = func(rqstp, &call->a_res);
319 static __be32 nlm4svc_proc_test_msg(struct svc_rqst *rqstp)
322 return nlm4svc_callback(rqstp, NLMPROC_TEST_RES, __nlm4svc_proc_test);
325 static __be32 nlm4svc_proc_lock_msg(struct svc_rqst *rqstp)
328 return nlm4svc_callback(rqstp, NLMPROC_LOCK_RES, __nlm4svc_proc_lock);
331 static __be32 nlm4svc_proc_cancel_msg(struct svc_rqst *rqstp)
334 return nlm4svc_callback(rqstp, NLMPROC_CANCEL_RES, __nlm4svc_proc_cancel);
337 static __be32 nlm4svc_proc_unlock_msg(struct svc_rqst *rqstp)
340 return nlm4svc_callback(rqstp, NLMPROC_UNLOCK_RES, __nlm4svc_proc_unlock);
343 static __be32 nlm4svc_proc_granted_msg(struct svc_rqst *rqstp)
346 return nlm4svc_callback(rqstp, NLMPROC_GRANTED_RES, __nlm4svc_proc_granted);
353 nlm4svc_proc_share(struct svc_rqst *rqstp)
355 struct nlm_args *argp = rqstp->rq_argp;
356 struct nlm_res *resp = rqstp->rq_resp;
365 if (locks_in_grace(SVC_NET(rqstp)) && !argp->reclaim) {
371 if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file)))
388 nlm4svc_proc_unshare(struct svc_rqst *rqstp)
390 struct nlm_args *argp = rqstp->rq_argp;
391 struct nlm_res *resp = rqstp->rq_resp;
400 if (locks_in_grace(SVC_NET(rqstp))) {
406 if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file)))
423 nlm4svc_proc_nm_lock(struct svc_rqst *rqstp)
425 struct nlm_args *argp = rqstp->rq_argp;
430 return nlm4svc_proc_lock(rqstp);
437 nlm4svc_proc_free_all(struct svc_rqst *rqstp)
439 struct nlm_args *argp = rqstp->rq_argp;
443 if (nlm4svc_retrieve_args(rqstp, argp, &host, NULL))
455 nlm4svc_proc_sm_notify(struct svc_rqst *rqstp)
457 struct nlm_reboot *argp = rqstp->rq_argp;
461 if (!nlm_privileged_requester(rqstp)) {
464 svc_print_addr(rqstp, buf, sizeof(buf)));
468 nlm_host_rebooted(SVC_NET(rqstp), argp);
476 nlm4svc_proc_granted_res(struct svc_rqst *rqstp)
478 struct nlm_res *argp = rqstp->rq_argp;
490 nlm4svc_proc_unused(struct svc_rqst *rqstp)