Lines Matching refs:lf

368 	struct lockf **lf = lock->lf_head;
370 while (*lf != NOLOCKF) {
372 if ((*lf == lock) ||
373 ((*lf)->lf_id != lock->lf_id) ||
374 ((*lf)->lf_type != lock->lf_type)) {
375 lf = &(*lf)->lf_next;
383 if ((*lf)->lf_end != -1 &&
384 ((*lf)->lf_end + 1) == lock->lf_start) {
385 struct lockf *adjacent = *lf;
388 lock->lf_start = (*lf)->lf_start;
389 *lf = lock;
390 lf = &(*lf)->lf_next;
399 (lock->lf_end + 1) == (*lf)->lf_start) {
400 struct lockf *adjacent = *lf;
403 lock->lf_end = (*lf)->lf_end;
404 lock->lf_next = (*lf)->lf_next;
405 lf = &lock->lf_next;
414 lf = &(*lf)->lf_next;
781 struct lockf *lf = *head;
785 if (lf == NOLOCKF)
794 while ((ovcase = lf_findoverlap(lf, unlock, SELF, &prev, &overlap)) != OVERLAP_NONE) {
825 lf = overlap->lf_next;
832 lf = overlap->lf_next;
918 struct lockf **prev, *overlap, *lf = *(lock->lf_head);
921 lf_findoverlap(lf, lock, OTHERS, &prev, &overlap) != OVERLAP_NONE;
922 lf = overlap->lf_next) {
948 * Parameters: lf First lock on lock list
988 lf_findoverlap(struct lockf *lf, struct lockf *lock, int type,
994 *overlap = lf;
995 if (lf == NOLOCKF)
1003 while (lf != NOLOCKF) {
1004 if (((type & SELF) && lf->lf_id != lock->lf_id) ||
1005 ((type & OTHERS) && lf->lf_id == lock->lf_id)) {
1019 *prev = &lf->lf_next;
1020 *overlap = lf = lf->lf_next;
1030 lf_print("\tchecking", lf);
1035 if ((lf->lf_end != -1 && start > lf->lf_end) ||
1036 (end != -1 && lf->lf_start > end)) {
1044 if ((type & SELF) && end != -1 && lf->lf_start > end)
1046 *prev = &lf->lf_next;
1047 *overlap = lf = lf->lf_next;
1050 if ((lf->lf_start == start) && (lf->lf_end == end)) {
1054 if ((lf->lf_start <= start) &&
1056 ((lf->lf_end >= end) || (lf->lf_end == -1))) {
1060 if (start <= lf->lf_start &&
1062 (lf->lf_end != -1 && end >= lf->lf_end))) {
1066 if ((lf->lf_start < start) &&
1067 ((lf->lf_end >= start) || (lf->lf_end == -1))) {
1071 if ((lf->lf_start > start) &&
1073 ((lf->lf_end > end) || (lf->lf_end == -1))) {
1272 struct lockf *lf, *blk;
1279 for (lf = lock->lf_vnode->v_lockf; lf; lf = lf->lf_next) {
1280 printf("\tlock %p for ",(void *)lf);
1281 if (lf->lf_flags & F_POSIX)
1283 (long)((struct proc *)lf->lf_id)->p_pid);
1285 printf("id %p", (void *)lf->lf_id);
1287 lf->lf_type == F_RDLCK ? "shared" :
1288 lf->lf_type == F_WRLCK ? "exclusive" :
1289 lf->lf_type == F_UNLCK ? "unlock" :
1290 "unknown", (intmax_t)lf->lf_start, (intmax_t)lf->lf_end);
1291 TAILQ_FOREACH(blk, &lf->lf_blkhd, lf_block) {