Lines Matching refs:lock

114 nlm_decode_lock(__be32 *p, struct nlm_lock *lock)  in nlm_decode_lock()  argument
116 struct file_lock *fl = &lock->fl; in nlm_decode_lock()
119 if (!(p = xdr_decode_string_inplace(p, &lock->caller, in nlm_decode_lock()
120 &lock->len, in nlm_decode_lock()
122 || !(p = nlm_decode_fh(p, &lock->fh)) in nlm_decode_lock()
123 || !(p = nlm_decode_oh(p, &lock->oh))) in nlm_decode_lock()
125 lock->svid = ntohl(*p++); in nlm_decode_lock()
129 fl->fl_pid = (pid_t)lock->svid; in nlm_decode_lock()
158 struct file_lock *fl = &resp->lock.fl; in nlm_encode_testres()
161 *p++ = htonl(resp->lock.svid); in nlm_encode_testres()
164 if (!(p = xdr_encode_netobj(p, &resp->lock.oh))) in nlm_encode_testres()
193 if (!(p = nlm_decode_lock(p, &argp->lock))) in nlmsvc_decode_testargs()
196 argp->lock.fl.fl_type = F_WRLCK; in nlmsvc_decode_testargs()
218 if (!(p = nlm_decode_lock(p, &argp->lock))) in nlmsvc_decode_lockargs()
221 argp->lock.fl.fl_type = F_WRLCK; in nlmsvc_decode_lockargs()
238 if (!(p = nlm_decode_lock(p, &argp->lock))) in nlmsvc_decode_cancargs()
241 argp->lock.fl.fl_type = F_WRLCK; in nlmsvc_decode_cancargs()
249 || !(p = nlm_decode_lock(p, &argp->lock))) in nlmsvc_decode_unlockargs()
251 argp->lock.fl.fl_type = F_UNLCK; in nlmsvc_decode_unlockargs()
258 struct nlm_lock *lock = &argp->lock; in nlmsvc_decode_shareargs() local
260 memset(lock, 0, sizeof(*lock)); in nlmsvc_decode_shareargs()
261 locks_init_lock(&lock->fl); in nlmsvc_decode_shareargs()
262 lock->svid = ~(u32) 0; in nlmsvc_decode_shareargs()
263 lock->fl.fl_pid = (pid_t)lock->svid; in nlmsvc_decode_shareargs()
266 || !(p = xdr_decode_string_inplace(p, &lock->caller, in nlmsvc_decode_shareargs()
267 &lock->len, NLM_MAXSTRLEN)) in nlmsvc_decode_shareargs()
268 || !(p = nlm_decode_fh(p, &lock->fh)) in nlmsvc_decode_shareargs()
269 || !(p = nlm_decode_oh(p, &lock->oh))) in nlmsvc_decode_shareargs()
298 struct nlm_lock *lock = &argp->lock; in nlmsvc_decode_notify() local
300 if (!(p = xdr_decode_string_inplace(p, &lock->caller, in nlmsvc_decode_notify()
301 &lock->len, NLM_MAXSTRLEN))) in nlmsvc_decode_notify()