Lines Matching refs:status
165 int status; in nlmclnt_proc() local
188 status = nlmclnt_lock(call, fl); in nlmclnt_proc()
190 status = nlmclnt_unlock(call, fl); in nlmclnt_proc()
192 status = nlmclnt_test(call, fl); in nlmclnt_proc()
194 status = -EINVAL; in nlmclnt_proc()
198 dprintk("lockd: clnt proc returns %d\n", status); in nlmclnt_proc()
199 return status; in nlmclnt_proc()
248 int status = -EINTR; in nlm_wait_on_grace() local
255 status = 0; in nlm_wait_on_grace()
258 return status; in nlm_wait_on_grace()
276 int status; in nlmclnt_call() local
291 if ((status = rpc_call_sync(clnt, &msg, 0)) < 0) { in nlmclnt_call()
292 dprintk("lockd: rpc_call returned error %d\n", -status); in nlmclnt_call()
293 switch (status) { in nlmclnt_call()
295 status = -EINVAL; in nlmclnt_call()
301 status = -EAGAIN; in nlmclnt_call()
304 return signalled () ? -EINTR : status; in nlmclnt_call()
310 if (resp->status == nlm_lck_denied_grace_period) { in nlmclnt_call()
323 ntohl(resp->status)); in nlmclnt_call()
334 status = nlm_wait_on_grace(&host->h_gracewait); in nlmclnt_call()
335 } while (status == 0); in nlmclnt_call()
337 return status; in nlmclnt_call()
434 int status; in nlmclnt_test() local
436 status = nlmclnt_call(nfs_file_cred(fl->c.flc_file), req, in nlmclnt_test()
438 if (status < 0) in nlmclnt_test()
441 switch (req->a_res.status) { in nlmclnt_test()
455 status = nlm_stat_to_errno(req->a_res.status); in nlmclnt_test()
460 req->a_host->h_addrlen, req->a_res.status); in nlmclnt_test()
462 return status; in nlmclnt_test()
531 int status = -ENOLCK; in nlmclnt_lock() local
538 status = do_vfs_lock(fl); in nlmclnt_lock()
540 if (status < 0) in nlmclnt_lock()
549 resp->status = nlm_lck_blocked; in nlmclnt_lock()
560 status = nlmclnt_call(cred, req, NLMPROC_LOCK); in nlmclnt_lock()
561 if (status < 0) in nlmclnt_lock()
564 if (resp->status == nlm_lck_denied_grace_period) in nlmclnt_lock()
566 if (resp->status != nlm_lck_blocked) in nlmclnt_lock()
569 status = nlmclnt_wait(&block, req, NLMCLNT_POLL_TIMEOUT); in nlmclnt_lock()
570 if (status < 0) in nlmclnt_lock()
576 if (resp->status == nlm_lck_blocked) in nlmclnt_lock()
577 resp->status = b_status; in nlmclnt_lock()
582 if (resp->status == nlm_lck_blocked) { in nlmclnt_lock()
589 if (resp->status == nlm_granted) { in nlmclnt_lock()
602 status = 0; in nlmclnt_lock()
604 if (status < 0) in nlmclnt_lock()
611 if (resp->status == nlm_lck_denied && (flags & FL_SLEEP)) in nlmclnt_lock()
612 status = -ENOLCK; in nlmclnt_lock()
614 status = nlm_stat_to_errno(resp->status); in nlmclnt_lock()
618 req->a_host->h_addrlen, req->a_res.status); in nlmclnt_lock()
620 return status; in nlmclnt_lock()
625 req->a_host->h_addrlen, req->a_res.status); in nlmclnt_lock()
636 return status; in nlmclnt_lock()
646 int status; in nlmclnt_reclaim() local
657 status = nlmclnt_call(nfs_file_cred(fl->c.flc_file), req, in nlmclnt_reclaim()
659 if (status >= 0 && req->a_res.status == nlm_granted) in nlmclnt_reclaim()
665 status, ntohl(req->a_res.status)); in nlmclnt_reclaim()
690 int status; in nlmclnt_unlock() local
700 status = do_vfs_lock(fl); in nlmclnt_unlock()
703 if (status == -ENOENT) { in nlmclnt_unlock()
704 status = 0; in nlmclnt_unlock()
709 status = nlmclnt_async_call(nfs_file_cred(fl->c.flc_file), req, in nlmclnt_unlock()
711 if (status < 0) in nlmclnt_unlock()
714 if (resp->status == nlm_granted) in nlmclnt_unlock()
717 if (resp->status != nlm_lck_denied_nolocks) in nlmclnt_unlock()
719 ntohl(resp->status)); in nlmclnt_unlock()
721 status = -ENOLCK; in nlmclnt_unlock()
725 req->a_host->h_addrlen, req->a_res.status); in nlmclnt_unlock()
727 return status; in nlmclnt_unlock()
746 u32 status = ntohl(req->a_res.status); in nlmclnt_unlock_callback() local
761 if (status == NLM_LCK_DENIED_GRACE_PERIOD) { in nlmclnt_unlock_callback()
765 if (status != NLM_LCK_GRANTED) in nlmclnt_unlock_callback()
766 printk(KERN_WARNING "lockd: unexpected unlock status: %d\n", status); in nlmclnt_unlock_callback()
789 int status; in nlmclnt_cancel() local
803 status = nlmclnt_async_call(nfs_file_cred(fl->c.flc_file), req, in nlmclnt_cancel()
805 if (status == 0 && req->a_res.status == nlm_lck_denied) in nlmclnt_cancel()
806 status = -ENOLCK; in nlmclnt_cancel()
808 return status; in nlmclnt_cancel()
814 u32 status = ntohl(req->a_res.status); in nlmclnt_cancel_callback() local
825 switch (status) { in nlmclnt_cancel_callback()
836 status); in nlmclnt_cancel_callback()
860 nlm_stat_to_errno(__be32 status) in nlm_stat_to_errno() argument
862 switch(ntohl(status)) { in nlm_stat_to_errno()
887 ntohl(status)); in nlm_stat_to_errno()