Lines Matching refs:lock
106 nlm4_decode_lock(__be32 *p, struct nlm_lock *lock) in nlm4_decode_lock() argument
108 struct file_lock *fl = &lock->fl; in nlm4_decode_lock()
112 if (!(p = xdr_decode_string_inplace(p, &lock->caller, in nlm4_decode_lock()
113 &lock->len, NLM_MAXSTRLEN)) in nlm4_decode_lock()
114 || !(p = nlm4_decode_fh(p, &lock->fh)) in nlm4_decode_lock()
115 || !(p = nlm4_decode_oh(p, &lock->oh))) in nlm4_decode_lock()
117 lock->svid = ntohl(*p++); in nlm4_decode_lock()
121 fl->fl_pid = (pid_t)lock->svid; in nlm4_decode_lock()
151 struct file_lock *fl = &resp->lock.fl; in nlm4_encode_testres()
154 *p++ = htonl(resp->lock.svid); in nlm4_encode_testres()
157 if (!(p = xdr_encode_netobj(p, &resp->lock.oh))) in nlm4_encode_testres()
169 resp->status, (int)resp->lock.svid, fl->fl_type, in nlm4_encode_testres()
190 if (!(p = nlm4_decode_lock(p, &argp->lock))) in nlm4svc_decode_testargs()
193 argp->lock.fl.fl_type = F_WRLCK; in nlm4svc_decode_testargs()
215 if (!(p = nlm4_decode_lock(p, &argp->lock))) in nlm4svc_decode_lockargs()
218 argp->lock.fl.fl_type = F_WRLCK; in nlm4svc_decode_lockargs()
235 if (!(p = nlm4_decode_lock(p, &argp->lock))) in nlm4svc_decode_cancargs()
238 argp->lock.fl.fl_type = F_WRLCK; in nlm4svc_decode_cancargs()
246 || !(p = nlm4_decode_lock(p, &argp->lock))) in nlm4svc_decode_unlockargs()
248 argp->lock.fl.fl_type = F_UNLCK; in nlm4svc_decode_unlockargs()
255 struct nlm_lock *lock = &argp->lock; in nlm4svc_decode_shareargs() local
257 memset(lock, 0, sizeof(*lock)); in nlm4svc_decode_shareargs()
258 locks_init_lock(&lock->fl); in nlm4svc_decode_shareargs()
259 lock->svid = ~(u32) 0; in nlm4svc_decode_shareargs()
260 lock->fl.fl_pid = (pid_t)lock->svid; in nlm4svc_decode_shareargs()
263 || !(p = xdr_decode_string_inplace(p, &lock->caller, in nlm4svc_decode_shareargs()
264 &lock->len, NLM_MAXSTRLEN)) in nlm4svc_decode_shareargs()
265 || !(p = nlm4_decode_fh(p, &lock->fh)) in nlm4svc_decode_shareargs()
266 || !(p = nlm4_decode_oh(p, &lock->oh))) in nlm4svc_decode_shareargs()
295 struct nlm_lock *lock = &argp->lock; in nlm4svc_decode_notify() local
297 if (!(p = xdr_decode_string_inplace(p, &lock->caller, in nlm4svc_decode_notify()
298 &lock->len, NLM_MAXSTRLEN))) in nlm4svc_decode_notify()