Lines Matching refs:status
158 int status; in nlmclnt_proc() local
176 status = nlmclnt_lock(call, fl); in nlmclnt_proc()
178 status = nlmclnt_unlock(call, fl); in nlmclnt_proc()
180 status = nlmclnt_test(call, fl); in nlmclnt_proc()
182 status = -EINVAL; in nlmclnt_proc()
186 dprintk("lockd: clnt proc returns %d\n", status); in nlmclnt_proc()
187 return status; in nlmclnt_proc()
232 int status = -EINTR; in nlm_wait_on_grace() local
239 status = 0; in nlm_wait_on_grace()
242 return status; in nlm_wait_on_grace()
260 int status; in nlmclnt_call() local
275 if ((status = rpc_call_sync(clnt, &msg, 0)) < 0) { in nlmclnt_call()
276 dprintk("lockd: rpc_call returned error %d\n", -status); in nlmclnt_call()
277 switch (status) { in nlmclnt_call()
279 status = -EINVAL; in nlmclnt_call()
285 status = -EAGAIN; in nlmclnt_call()
288 return signalled () ? -EINTR : status; in nlmclnt_call()
294 if (resp->status == nlm_lck_denied_grace_period) { in nlmclnt_call()
307 ntohl(resp->status)); in nlmclnt_call()
318 status = nlm_wait_on_grace(&host->h_gracewait); in nlmclnt_call()
319 } while (status == 0); in nlmclnt_call()
321 return status; in nlmclnt_call()
418 int status; in nlmclnt_test() local
420 status = nlmclnt_call(nfs_file_cred(fl->fl_file), req, NLMPROC_TEST); in nlmclnt_test()
421 if (status < 0) in nlmclnt_test()
424 switch (req->a_res.status) { in nlmclnt_test()
438 status = nlm_stat_to_errno(req->a_res.status); in nlmclnt_test()
442 return status; in nlmclnt_test()
509 int status = -ENOLCK; in nlmclnt_lock() local
516 status = do_vfs_lock(fl); in nlmclnt_lock()
518 if (status < 0) in nlmclnt_lock()
527 resp->status = nlm_lck_blocked; in nlmclnt_lock()
531 status = nlmclnt_call(cred, req, NLMPROC_LOCK); in nlmclnt_lock()
532 if (status < 0) in nlmclnt_lock()
535 if (resp->status == nlm_lck_denied_grace_period) in nlmclnt_lock()
537 if (resp->status != nlm_lck_blocked) in nlmclnt_lock()
540 status = nlmclnt_block(block, req, NLMCLNT_POLL_TIMEOUT); in nlmclnt_lock()
541 if (status < 0) in nlmclnt_lock()
543 if (resp->status != nlm_lck_blocked) in nlmclnt_lock()
550 if (resp->status == nlm_lck_blocked) { in nlmclnt_lock()
557 if (resp->status == nlm_granted) { in nlmclnt_lock()
570 status = 0; in nlmclnt_lock()
572 if (status < 0) in nlmclnt_lock()
579 if (resp->status == nlm_lck_denied && (fl_flags & FL_SLEEP)) in nlmclnt_lock()
580 status = -ENOLCK; in nlmclnt_lock()
582 status = nlm_stat_to_errno(resp->status); in nlmclnt_lock()
587 return status; in nlmclnt_lock()
601 return status; in nlmclnt_lock()
611 int status; in nlmclnt_reclaim() local
622 status = nlmclnt_call(nfs_file_cred(fl->fl_file), req, NLMPROC_LOCK); in nlmclnt_reclaim()
623 if (status >= 0 && req->a_res.status == nlm_granted) in nlmclnt_reclaim()
628 status, ntohl(req->a_res.status)); in nlmclnt_reclaim()
653 int status; in nlmclnt_unlock() local
663 status = do_vfs_lock(fl); in nlmclnt_unlock()
666 if (status == -ENOENT) { in nlmclnt_unlock()
667 status = 0; in nlmclnt_unlock()
672 status = nlmclnt_async_call(nfs_file_cred(fl->fl_file), req, in nlmclnt_unlock()
674 if (status < 0) in nlmclnt_unlock()
677 if (resp->status == nlm_granted) in nlmclnt_unlock()
680 if (resp->status != nlm_lck_denied_nolocks) in nlmclnt_unlock()
682 ntohl(resp->status)); in nlmclnt_unlock()
684 status = -ENOLCK; in nlmclnt_unlock()
687 return status; in nlmclnt_unlock()
693 u32 status = ntohl(req->a_res.status); in nlmclnt_unlock_callback() local
708 if (status == NLM_LCK_DENIED_GRACE_PERIOD) { in nlmclnt_unlock_callback()
712 if (status != NLM_LCK_GRANTED) in nlmclnt_unlock_callback()
713 printk(KERN_WARNING "lockd: unexpected unlock status: %d\n", status); in nlmclnt_unlock_callback()
735 int status; in nlmclnt_cancel() local
749 status = nlmclnt_async_call(nfs_file_cred(fl->fl_file), req, in nlmclnt_cancel()
751 if (status == 0 && req->a_res.status == nlm_lck_denied) in nlmclnt_cancel()
752 status = -ENOLCK; in nlmclnt_cancel()
754 return status; in nlmclnt_cancel()
760 u32 status = ntohl(req->a_res.status); in nlmclnt_cancel_callback() local
772 status, task->tk_pid); in nlmclnt_cancel_callback()
774 switch (status) { in nlmclnt_cancel_callback()
785 status); in nlmclnt_cancel_callback()
809 nlm_stat_to_errno(__be32 status) in nlm_stat_to_errno() argument
811 switch(ntohl(status)) { in nlm_stat_to_errno()
836 ntohl(status)); in nlm_stat_to_errno()