Lines Matching refs:fl

77     struct vnode *vp, int op, struct flock *fl, int flags,
81 struct vnode *vp, int op, struct flock *fl, int flags,
85 struct vnode *vp, int op, struct flock *fl, int flags,
90 static int nlm_init_lock(struct flock *fl, int flags, int svid,
194 nlm_advlock_internal(struct vnode *vp, void *id, int op, struct flock *fl,
270 KASSERT(fl->l_start == 0 && fl->l_len == 0,
286 svid = fl->l_pid;
294 && fl->l_type == F_WRLCK) {
307 vp, F_SETLK, fl, flags & ~F_WAIT,
310 fl->l_type = F_UNLCK;
312 retries, vp, F_UNLCK, fl, flags,
314 fl->l_type = F_WRLCK;
324 &timo, retries, vp, F_SETLK, fl,
331 vp, op, fl, flags, svid, fhlen, &fh.fh_bytes,
354 vp, op, fl, flags, svid, fhlen, &fh.fh_bytes, size);
367 vp, op, fl, flags, svid, fhlen, &fh.fh_bytes, size);
402 nlm_set_creds_for_lock(struct thread *td, struct flock *fl)
410 if (fl->l_pid > PID_MAX) {
420 if (ns->ns_svid == fl->l_pid) {
432 p = pfind(fl->l_pid);
451 nlm_reclaim_free_lock(struct vnode *vp, struct flock *fl, void *arg)
458 newfl = *fl;
488 nlm_client_recover_lock(struct vnode *vp, struct flock *fl, void *arg)
509 nlm_set_creds_for_lock(td, fl);
511 error = nlm_advlock_internal(vp, NULL, F_SETLK, fl, F_REMOTE,
695 nlm_record_lock(struct vnode *vp, int op, struct flock *fl,
710 newfl.l_start = fl->l_start;
711 newfl.l_len = fl->l_len;
712 newfl.l_type = fl->l_type;
713 newfl.l_whence = fl->l_whence;
760 struct vnode *vp, int op, struct flock *fl, int flags,
777 exclusive = (fl->l_type == F_WRLCK);
779 error = nlm_init_lock(fl, flags, svid, vers, fhlen, fh, size,
946 nlm_record_lock(vp, op, fl, args.alock.svid,
958 struct vnode *vp, int op, struct flock *fl, int flags,
972 error = nlm_init_lock(fl, flags, svid, vers, fhlen, fh, size,
1023 nlm_record_lock(vp, op, fl, args.alock.svid,
1033 struct vnode *vp, int op, struct flock *fl, int flags,
1050 exclusive = (fl->l_type == F_WRLCK);
1052 error = nlm_init_lock(fl, flags, svid, vers, fhlen, fh, size,
1096 fl->l_start = h->l_offset;
1097 fl->l_len = h->l_len;
1098 fl->l_pid = h->svid;
1100 fl->l_type = F_WRLCK;
1102 fl->l_type = F_RDLCK;
1103 fl->l_whence = SEEK_SET;
1104 fl->l_sysid = 0;
1106 fl->l_type = F_UNLCK;
1220 nlm_init_lock(struct flock *fl, int flags, int svid,
1227 if (fl->l_whence == SEEK_END) {
1229 || (fl->l_start > 0 && size > OFF_MAX - fl->l_start))
1231 start = size + fl->l_start;
1232 } else if (fl->l_whence == SEEK_SET || fl->l_whence == SEEK_CUR) {
1233 start = fl->l_start;
1239 if (fl->l_len < 0) {
1240 len = -fl->l_len;
1245 len = fl->l_len;