Lines Matching refs:rqstp
42 #define cast_status(status) (cast_to_nlm(status, rqstp->rq_vers))
51 nlmsvc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp, in nlmsvc_retrieve_args() argument
64 if (!(host = nlmsvc_lookup_host(rqstp, lock->caller, lock->len)) in nlmsvc_retrieve_args()
71 error = cast_status(nlm_lookup_file(rqstp, &file, &lock->fh)); in nlmsvc_retrieve_args()
95 nlmsvc_proc_null(struct svc_rqst *rqstp, void *argp, void *resp) in nlmsvc_proc_null() argument
105 nlmsvc_proc_test(struct svc_rqst *rqstp, struct nlm_args *argp, in nlmsvc_proc_test() argument
116 if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file))) in nlmsvc_proc_test()
120 …resp->status = cast_status(nlmsvc_testlock(rqstp, file, host, &argp->lock, &resp->lock, &resp->coo… in nlmsvc_proc_test()
125 ntohl(resp->status), rqstp->rq_vers); in nlmsvc_proc_test()
133 nlmsvc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp, in nlmsvc_proc_lock() argument
145 if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file))) in nlmsvc_proc_lock()
161 resp->status = cast_status(nlmsvc_lock(rqstp, file, host, &argp->lock, in nlmsvc_proc_lock()
175 nlmsvc_proc_cancel(struct svc_rqst *rqstp, struct nlm_args *argp, in nlmsvc_proc_cancel() argument
180 struct net *net = SVC_NET(rqstp); in nlmsvc_proc_cancel()
193 if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file))) in nlmsvc_proc_cancel()
209 nlmsvc_proc_unlock(struct svc_rqst *rqstp, struct nlm_args *argp, in nlmsvc_proc_unlock() argument
214 struct net *net = SVC_NET(rqstp); in nlmsvc_proc_unlock()
227 if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file))) in nlmsvc_proc_unlock()
244 nlmsvc_proc_granted(struct svc_rqst *rqstp, struct nlm_args *argp, in nlmsvc_proc_granted() argument
250 resp->status = nlmclnt_grant(svc_addr(rqstp), &argp->lock); in nlmsvc_proc_granted()
287 static __be32 nlmsvc_callback(struct svc_rqst *rqstp, u32 proc, struct nlm_args *argp, in nlmsvc_callback() argument
294 host = nlmsvc_lookup_host(rqstp, in nlmsvc_callback()
305 stat = func(rqstp, argp, &call->a_res); in nlmsvc_callback()
317 static __be32 nlmsvc_proc_test_msg(struct svc_rqst *rqstp, struct nlm_args *argp, in nlmsvc_proc_test_msg() argument
321 return nlmsvc_callback(rqstp, NLMPROC_TEST_RES, argp, nlmsvc_proc_test); in nlmsvc_proc_test_msg()
324 static __be32 nlmsvc_proc_lock_msg(struct svc_rqst *rqstp, struct nlm_args *argp, in nlmsvc_proc_lock_msg() argument
328 return nlmsvc_callback(rqstp, NLMPROC_LOCK_RES, argp, nlmsvc_proc_lock); in nlmsvc_proc_lock_msg()
331 static __be32 nlmsvc_proc_cancel_msg(struct svc_rqst *rqstp, struct nlm_args *argp, in nlmsvc_proc_cancel_msg() argument
335 return nlmsvc_callback(rqstp, NLMPROC_CANCEL_RES, argp, nlmsvc_proc_cancel); in nlmsvc_proc_cancel_msg()
339 nlmsvc_proc_unlock_msg(struct svc_rqst *rqstp, struct nlm_args *argp, in nlmsvc_proc_unlock_msg() argument
343 return nlmsvc_callback(rqstp, NLMPROC_UNLOCK_RES, argp, nlmsvc_proc_unlock); in nlmsvc_proc_unlock_msg()
347 nlmsvc_proc_granted_msg(struct svc_rqst *rqstp, struct nlm_args *argp, in nlmsvc_proc_granted_msg() argument
351 return nlmsvc_callback(rqstp, NLMPROC_GRANTED_RES, argp, nlmsvc_proc_granted); in nlmsvc_proc_granted_msg()
358 nlmsvc_proc_share(struct svc_rqst *rqstp, struct nlm_args *argp, in nlmsvc_proc_share() argument
369 if (locks_in_grace(SVC_NET(rqstp)) && !argp->reclaim) { in nlmsvc_proc_share()
375 if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file))) in nlmsvc_proc_share()
391 nlmsvc_proc_unshare(struct svc_rqst *rqstp, struct nlm_args *argp, in nlmsvc_proc_unshare() argument
402 if (locks_in_grace(SVC_NET(rqstp))) { in nlmsvc_proc_unshare()
408 if ((resp->status = nlmsvc_retrieve_args(rqstp, argp, &host, &file))) in nlmsvc_proc_unshare()
424 nlmsvc_proc_nm_lock(struct svc_rqst *rqstp, struct nlm_args *argp, in nlmsvc_proc_nm_lock() argument
430 return nlmsvc_proc_lock(rqstp, argp, resp); in nlmsvc_proc_nm_lock()
437 nlmsvc_proc_free_all(struct svc_rqst *rqstp, struct nlm_args *argp, in nlmsvc_proc_free_all() argument
443 if (nlmsvc_retrieve_args(rqstp, argp, &host, NULL)) in nlmsvc_proc_free_all()
455 nlmsvc_proc_sm_notify(struct svc_rqst *rqstp, struct nlm_reboot *argp, in nlmsvc_proc_sm_notify() argument
460 if (!nlm_privileged_requester(rqstp)) { in nlmsvc_proc_sm_notify()
463 svc_print_addr(rqstp, buf, sizeof(buf))); in nlmsvc_proc_sm_notify()
475 nlmsvc_proc_granted_res(struct svc_rqst *rqstp, struct nlm_res *argp, in nlmsvc_proc_granted_res() argument