• Home
  • Raw
  • Download

Lines Matching refs:lock

121 nlm_decode_lock(__be32 *p, struct nlm_lock *lock)  in nlm_decode_lock()  argument
123 struct file_lock *fl = &lock->fl; in nlm_decode_lock()
126 if (!(p = xdr_decode_string_inplace(p, &lock->caller, in nlm_decode_lock()
127 &lock->len, in nlm_decode_lock()
129 || !(p = nlm_decode_fh(p, &lock->fh)) in nlm_decode_lock()
130 || !(p = nlm_decode_oh(p, &lock->oh))) in nlm_decode_lock()
132 lock->svid = ntohl(*p++); in nlm_decode_lock()
136 fl->fl_pid = (pid_t)lock->svid; in nlm_decode_lock()
156 nlm_encode_lock(__be32 *p, struct nlm_lock *lock) in nlm_encode_lock() argument
158 struct file_lock *fl = &lock->fl; in nlm_encode_lock()
161 if (!(p = xdr_encode_string(p, lock->caller)) in nlm_encode_lock()
162 || !(p = nlm_encode_fh(p, &lock->fh)) in nlm_encode_lock()
163 || !(p = nlm_encode_oh(p, &lock->oh))) in nlm_encode_lock()
176 *p++ = htonl(lock->svid); in nlm_encode_lock()
196 struct file_lock *fl = &resp->lock.fl; in nlm_encode_testres()
199 *p++ = htonl(resp->lock.svid); in nlm_encode_testres()
202 if (!(p = xdr_encode_netobj(p, &resp->lock.oh))) in nlm_encode_testres()
231 if (!(p = nlm_decode_lock(p, &argp->lock))) in nlmsvc_decode_testargs()
234 argp->lock.fl.fl_type = F_WRLCK; in nlmsvc_decode_testargs()
256 if (!(p = nlm_decode_lock(p, &argp->lock))) in nlmsvc_decode_lockargs()
259 argp->lock.fl.fl_type = F_WRLCK; in nlmsvc_decode_lockargs()
276 if (!(p = nlm_decode_lock(p, &argp->lock))) in nlmsvc_decode_cancargs()
279 argp->lock.fl.fl_type = F_WRLCK; in nlmsvc_decode_cancargs()
287 || !(p = nlm_decode_lock(p, &argp->lock))) in nlmsvc_decode_unlockargs()
289 argp->lock.fl.fl_type = F_UNLCK; in nlmsvc_decode_unlockargs()
296 struct nlm_lock *lock = &argp->lock; in nlmsvc_decode_shareargs() local
298 memset(lock, 0, sizeof(*lock)); in nlmsvc_decode_shareargs()
299 locks_init_lock(&lock->fl); in nlmsvc_decode_shareargs()
300 lock->svid = ~(u32) 0; in nlmsvc_decode_shareargs()
301 lock->fl.fl_pid = (pid_t)lock->svid; in nlmsvc_decode_shareargs()
304 || !(p = xdr_decode_string_inplace(p, &lock->caller, in nlmsvc_decode_shareargs()
305 &lock->len, NLM_MAXSTRLEN)) in nlmsvc_decode_shareargs()
306 || !(p = nlm_decode_fh(p, &lock->fh)) in nlmsvc_decode_shareargs()
307 || !(p = nlm_decode_oh(p, &lock->oh))) in nlmsvc_decode_shareargs()
336 struct nlm_lock *lock = &argp->lock; in nlmsvc_decode_notify() local
338 if (!(p = xdr_decode_string_inplace(p, &lock->caller, in nlmsvc_decode_notify()
339 &lock->len, NLM_MAXSTRLEN))) in nlmsvc_decode_notify()
391 struct nlm_lock *lock = &argp->lock; in nlmclt_encode_testargs() local
395 *p++ = (lock->fl.fl_type == F_WRLCK)? xdr_one : xdr_zero; in nlmclt_encode_testargs()
396 if (!(p = nlm_encode_lock(p, lock))) in nlmclt_encode_testargs()
409 struct file_lock *fl = &resp->lock.fl; in nlmclt_decode_testres()
413 memset(&resp->lock, 0, sizeof(resp->lock)); in nlmclt_decode_testres()
416 resp->lock.svid = ntohl(*p++); in nlmclt_decode_testres()
417 fl->fl_pid = (pid_t)resp->lock.svid; in nlmclt_decode_testres()
418 if (!(p = nlm_decode_oh(p, &resp->lock.oh))) in nlmclt_decode_testres()
440 struct nlm_lock *lock = &argp->lock; in nlmclt_encode_lockargs() local
445 *p++ = (lock->fl.fl_type == F_WRLCK)? xdr_one : xdr_zero; in nlmclt_encode_lockargs()
446 if (!(p = nlm_encode_lock(p, lock))) in nlmclt_encode_lockargs()
457 struct nlm_lock *lock = &argp->lock; in nlmclt_encode_cancargs() local
462 *p++ = (lock->fl.fl_type == F_WRLCK)? xdr_one : xdr_zero; in nlmclt_encode_cancargs()
463 if (!(p = nlm_encode_lock(p, lock))) in nlmclt_encode_cancargs()
472 struct nlm_lock *lock = &argp->lock; in nlmclt_encode_unlockargs() local
476 if (!(p = nlm_encode_lock(p, lock))) in nlmclt_encode_unlockargs()