Lines Matching refs:req
48 nlmclnt_setlockargs(struct nlm_rqst *req, struct file_lock *fl) in nlmclnt_setlockargs() argument
50 struct nlm_args *argp = &req->a_args; in nlmclnt_setlockargs()
57 lock->oh.data = req->a_owner; in nlmclnt_setlockargs()
58 lock->oh.len = sprintf(req->a_owner, "%d@%s", in nlmclnt_setlockargs()
237 nlmclnt_call(struct nlm_rqst *req, u32 proc) in nlmclnt_call() argument
239 struct nlm_host *host = req->a_host; in nlmclnt_call()
241 struct nlm_args *argp = &req->a_args; in nlmclnt_call()
242 struct nlm_res *resp = &req->a_res; in nlmclnt_call()
320 nlmsvc_async_call(struct nlm_rqst *req, u32 proc, rpc_action callback) in nlmsvc_async_call() argument
322 struct nlm_host *host = req->a_host; in nlmsvc_async_call()
324 struct nlm_args *argp = &req->a_args; in nlmsvc_async_call()
325 struct nlm_res *resp = &req->a_res; in nlmsvc_async_call()
341 status = rpc_call_async(clnt, &msg, RPC_TASK_ASYNC, callback, req); in nlmsvc_async_call()
347 nlmclnt_async_call(struct nlm_rqst *req, u32 proc, rpc_action callback) in nlmclnt_async_call() argument
349 struct nlm_host *host = req->a_host; in nlmclnt_async_call()
351 struct nlm_args *argp = &req->a_args; in nlmclnt_async_call()
352 struct nlm_res *resp = &req->a_res; in nlmclnt_async_call()
374 status = rpc_call_async(clnt, &msg, RPC_TASK_ASYNC, callback, req); in nlmclnt_async_call()
384 nlmclnt_test(struct nlm_rqst *req, struct file_lock *fl) in nlmclnt_test() argument
388 if ((status = nlmclnt_call(req, NLMPROC_TEST)) < 0) in nlmclnt_test()
391 status = req->a_res.status; in nlmclnt_test()
399 locks_copy_lock(fl, &req->a_res.lock.fl); in nlmclnt_test()
402 return nlm_stat_to_errno(req->a_res.status); in nlmclnt_test()
443 nlmclnt_lock(struct nlm_rqst *req, struct file_lock *fl) in nlmclnt_lock() argument
445 struct nlm_host *host = req->a_host; in nlmclnt_lock()
446 struct nlm_res *resp = &req->a_res; in nlmclnt_lock()
456 if ((status = nlmclnt_call(req, NLMPROC_LOCK)) >= 0) { in nlmclnt_lock()
463 } while (resp->status == NLM_LCK_BLOCKED && req->a_args.block); in nlmclnt_lock()
482 struct nlm_rqst reqst, *req; in nlmclnt_reclaim() local
485 req = &reqst; in nlmclnt_reclaim()
486 memset(req, 0, sizeof(*req)); in nlmclnt_reclaim()
487 locks_init_lock(&req->a_args.lock.fl); in nlmclnt_reclaim()
488 locks_init_lock(&req->a_res.lock.fl); in nlmclnt_reclaim()
489 req->a_host = host; in nlmclnt_reclaim()
490 req->a_flags = 0; in nlmclnt_reclaim()
493 nlmclnt_setlockargs(req, fl); in nlmclnt_reclaim()
494 req->a_args.reclaim = 1; in nlmclnt_reclaim()
496 if ((status = nlmclnt_call(req, NLMPROC_LOCK)) >= 0 in nlmclnt_reclaim()
497 && req->a_res.status == NLM_LCK_GRANTED) in nlmclnt_reclaim()
502 status, req->a_res.status); in nlmclnt_reclaim()
523 nlmclnt_unlock(struct nlm_rqst *req, struct file_lock *fl) in nlmclnt_unlock() argument
525 struct nlm_res *resp = &req->a_res; in nlmclnt_unlock()
532 if (req->a_flags & RPC_TASK_ASYNC) { in nlmclnt_unlock()
533 return nlmclnt_async_call(req, NLMPROC_UNLOCK, in nlmclnt_unlock()
537 if ((status = nlmclnt_call(req, NLMPROC_UNLOCK)) < 0) in nlmclnt_unlock()
554 struct nlm_rqst *req = (struct nlm_rqst *) task->tk_calldata; in nlmclnt_unlock_callback() local
555 int status = req->a_res.status; in nlmclnt_unlock_callback()
572 nlm_release_host(req->a_host); in nlmclnt_unlock_callback()
573 kfree(req); in nlmclnt_unlock_callback()
576 nlm_rebind_host(req->a_host); in nlmclnt_unlock_callback()
589 struct nlm_rqst *req; in nlmclnt_cancel() local
601 req = nlmclnt_alloc_call(); in nlmclnt_cancel()
602 if (!req) in nlmclnt_cancel()
604 req->a_host = host; in nlmclnt_cancel()
605 req->a_flags = RPC_TASK_ASYNC; in nlmclnt_cancel()
607 nlmclnt_setlockargs(req, fl); in nlmclnt_cancel()
609 status = nlmclnt_async_call(req, NLMPROC_CANCEL, in nlmclnt_cancel()
612 kfree(req); in nlmclnt_cancel()
625 struct nlm_rqst *req = (struct nlm_rqst *) task->tk_calldata; in nlmclnt_cancel_callback() local
637 req->a_res.status, task->tk_pid); in nlmclnt_cancel_callback()
639 switch (req->a_res.status) { in nlmclnt_cancel_callback()
649 req->a_res.status); in nlmclnt_cancel_callback()
653 nlm_release_host(req->a_host); in nlmclnt_cancel_callback()
654 kfree(req); in nlmclnt_cancel_callback()
658 nlm_rebind_host(req->a_host); in nlmclnt_cancel_callback()