Lines Matching refs:lock
28 struct nlm_lock *lock = &argp->lock; in nlm4svc_retrieve_args() local
35 if (lock->lock_start > OFFSET_MAX || in nlm4svc_retrieve_args()
36 (lock->lock_len && ((lock->lock_len - 1) > (OFFSET_MAX - lock->lock_start)))) in nlm4svc_retrieve_args()
40 if (!(host = nlmsvc_lookup_host(rqstp, lock->caller, lock->len)) in nlm4svc_retrieve_args()
47 int mode = lock_to_openmode(&lock->fl); in nlm4svc_retrieve_args()
49 lock->fl.c.flc_flags = FL_POSIX; in nlm4svc_retrieve_args()
51 error = nlm_lookup_file(rqstp, &file, lock); in nlm4svc_retrieve_args()
57 lock->fl.c.flc_file = file->f_file[mode]; in nlm4svc_retrieve_args()
58 lock->fl.c.flc_pid = current->tgid; in nlm4svc_retrieve_args()
59 lock->fl.fl_start = (loff_t)lock->lock_start; in nlm4svc_retrieve_args()
60 lock->fl.fl_end = lock->lock_len ? in nlm4svc_retrieve_args()
61 (loff_t)(lock->lock_start + lock->lock_len - 1) : in nlm4svc_retrieve_args()
63 lock->fl.fl_lmops = &nlmsvc_lock_operations; in nlm4svc_retrieve_args()
64 nlmsvc_locks_init_private(&lock->fl, host, (pid_t)lock->svid); in nlm4svc_retrieve_args()
65 if (!lock->fl.c.flc_owner) { in nlm4svc_retrieve_args()
110 test_owner = argp->lock.fl.c.flc_owner; in __nlm4svc_proc_test()
112 resp->status = nlmsvc_testlock(rqstp, file, host, &argp->lock, in __nlm4svc_proc_test()
113 &resp->lock); in __nlm4svc_proc_test()
148 resp->status = nlmsvc_lock(rqstp, file, host, &argp->lock, in __nlm4svc_proc_lock()
156 nlmsvc_release_lockowner(&argp->lock); in __nlm4svc_proc_lock()
190 resp->status = nlmsvc_cancel_blocked(SVC_NET(rqstp), file, &argp->lock); in __nlm4svc_proc_cancel()
193 nlmsvc_release_lockowner(&argp->lock); in __nlm4svc_proc_cancel()
230 resp->status = nlmsvc_unlock(SVC_NET(rqstp), file, &argp->lock); in __nlm4svc_proc_unlock()
233 nlmsvc_release_lockowner(&argp->lock); in __nlm4svc_proc_unlock()
257 resp->status = nlmclnt_grant(svc_addr(rqstp), &argp->lock); in __nlm4svc_proc_granted()
299 argp->lock.caller, in nlm4svc_callback()
300 argp->lock.len); in nlm4svc_callback()
380 nlmsvc_release_lockowner(&argp->lock); in nlm4svc_proc_share()
415 nlmsvc_release_lockowner(&argp->lock); in nlm4svc_proc_unshare()