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,
65 if (!(host = nlmsvc_lookup_host(rqstp, lock->caller, lock->len))
72 error = cast_status(nlm_lookup_file(rqstp, &file, &lock->fh));
102 nlmsvc_proc_null(struct svc_rqst *rqstp)
112 __nlmsvc_proc_test(struct svc_rqst *rqstp, struct nlm_res *resp)
114 struct nlm_args *argp = rqstp->rq_argp;
123 if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))
127 resp->status = cast_status(nlmsvc_testlock(rqstp, file, host, &argp->lock, &resp->lock, &resp->cookie));
132 ntohl(resp->status), rqstp->rq_vers);
141 nlmsvc_proc_test(struct svc_rqst *rqstp)
143 return __nlmsvc_proc_test(rqstp, rqstp->rq_resp);
147 __nlmsvc_proc_lock(struct svc_rqst *rqstp, struct nlm_res *resp)
149 struct nlm_args *argp = rqstp->rq_argp;
159 if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))
175 resp->status = cast_status(nlmsvc_lock(rqstp, file, host, &argp->lock,
190 nlmsvc_proc_lock(struct svc_rqst *rqstp)
192 return __nlmsvc_proc_lock(rqstp, rqstp->rq_resp);
196 __nlmsvc_proc_cancel(struct svc_rqst *rqstp, struct nlm_res *resp)
198 struct nlm_args *argp = rqstp->rq_argp;
201 struct net *net = SVC_NET(rqstp);
214 if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))
228 nlmsvc_proc_cancel(struct svc_rqst *rqstp)
230 return __nlmsvc_proc_cancel(rqstp, rqstp->rq_resp);
237 __nlmsvc_proc_unlock(struct svc_rqst *rqstp, struct nlm_res *resp)
239 struct nlm_args *argp = rqstp->rq_argp;
242 struct net *net = SVC_NET(rqstp);
255 if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))
269 nlmsvc_proc_unlock(struct svc_rqst *rqstp)
271 return __nlmsvc_proc_unlock(rqstp, rqstp->rq_resp);
279 __nlmsvc_proc_granted(struct svc_rqst *rqstp, struct nlm_res *resp)
281 struct nlm_args *argp = rqstp->rq_argp;
286 resp->status = nlmclnt_grant(svc_addr(rqstp), &argp->lock);
292 nlmsvc_proc_granted(struct svc_rqst *rqstp)
294 return __nlmsvc_proc_granted(rqstp, rqstp->rq_resp);
329 static __be32 nlmsvc_callback(struct svc_rqst *rqstp, u32 proc,
332 struct nlm_args *argp = rqstp->rq_argp;
337 host = nlmsvc_lookup_host(rqstp,
348 stat = func(rqstp, &call->a_res);
360 static __be32 nlmsvc_proc_test_msg(struct svc_rqst *rqstp)
363 return nlmsvc_callback(rqstp, NLMPROC_TEST_RES, __nlmsvc_proc_test);
366 static __be32 nlmsvc_proc_lock_msg(struct svc_rqst *rqstp)
369 return nlmsvc_callback(rqstp, NLMPROC_LOCK_RES, __nlmsvc_proc_lock);
372 static __be32 nlmsvc_proc_cancel_msg(struct svc_rqst *rqstp)
375 return nlmsvc_callback(rqstp, NLMPROC_CANCEL_RES, __nlmsvc_proc_cancel);
379 nlmsvc_proc_unlock_msg(struct svc_rqst *rqstp)
382 return nlmsvc_callback(rqstp, NLMPROC_UNLOCK_RES, __nlmsvc_proc_unlock);
386 nlmsvc_proc_granted_msg(struct svc_rqst *rqstp)
389 return nlmsvc_callback(rqstp, NLMPROC_GRANTED_RES, __nlmsvc_proc_granted);
396 nlmsvc_proc_share(struct svc_rqst *rqstp)
398 struct nlm_args *argp = rqstp->rq_argp;
399 struct nlm_res *resp = rqstp->rq_resp;
408 if (locks_in_grace(SVC_NET(rqstp)) && !argp->reclaim) {
414 if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))
431 nlmsvc_proc_unshare(struct svc_rqst *rqstp)
433 struct nlm_args *argp = rqstp->rq_argp;
434 struct nlm_res *resp = rqstp->rq_resp;
443 if (locks_in_grace(SVC_NET(rqstp))) {
449 if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file)))
466 nlmsvc_proc_nm_lock(struct svc_rqst *rqstp)
468 struct nlm_args *argp = rqstp->rq_argp;
473 return nlmsvc_proc_lock(rqstp);
480 nlmsvc_proc_free_all(struct svc_rqst *rqstp)
482 struct nlm_args *argp = rqstp->rq_argp;
486 if (nlmsvc_retrieve_args(rqstp, argp, &host, NULL))
498 nlmsvc_proc_sm_notify(struct svc_rqst *rqstp)
500 struct nlm_reboot *argp = rqstp->rq_argp;
504 if (!nlm_privileged_requester(rqstp)) {
507 svc_print_addr(rqstp, buf, sizeof(buf)));
511 nlm_host_rebooted(SVC_NET(rqstp), argp);
519 nlmsvc_proc_granted_res(struct svc_rqst *rqstp)
521 struct nlm_res *argp = rqstp->rq_argp;
533 nlmsvc_proc_unused(struct svc_rqst *rqstp)