Lines Matching defs:new_lop
116 static void nfsrv_insertlock(struct nfslock *new_lop,
1513 * The structures new_stp and new_lop are passed in as pointers that should
1529 struct nfslock *new_lop = *new_lopp;
1634 (new_lop->lo_flags & (NFSLCK_READ | NFSLCK_WRITE)),
1635 new_lop->lo_first, new_lop->lo_end, cfp, p);
1873 !((new_lop->lo_flags >> NFSLCK_LOCKSHIFT) &
1987 (new_lop->lo_flags & NFSLCK_READ))) &&
1991 (new_lop->lo_flags & NFSLCK_WRITE) &&
2041 first = new_lop->lo_first;
2042 end = new_lop->lo_end;
2074 if (new_lop->lo_end > lop->lo_first &&
2075 new_lop->lo_first < lop->lo_end &&
2076 (new_lop->lo_flags == NFSLCK_WRITE ||
2173 first = new_lop->lo_first;
2174 end = new_lop->lo_end;
2175 lock_flags = new_lop->lo_flags;
2202 nfsrv_insertlock(new_lop, (struct nfslock *)new_stp, new_stp,
3616 nfsrv_insertlock(struct nfslock *new_lop, struct nfslock *insert_lop,
3621 new_lop->lo_stp = stp;
3622 new_lop->lo_lfp = lfp;
3628 new_lop->lo_first <= lop->lo_first) {
3629 LIST_INSERT_HEAD(&lfp->lf_lock, new_lop, lo_lckfile);
3633 nlop->lo_first < new_lop->lo_first) {
3637 LIST_INSERT_AFTER(lop, new_lop, lo_lckfile);
3640 new_lop->lo_lckfile.le_prev = NULL; /* list not used */
3648 LIST_INSERT_HEAD(&lfp->lf_locallock, new_lop, lo_lckowner);
3650 LIST_INSERT_HEAD(&stp->ls_lock, new_lop, lo_lckowner);
3652 LIST_INSERT_AFTER(insert_lop, new_lop, lo_lckowner);
3663 * It always adds new_lop to the list and sometimes uses the one pointed
3670 struct nfslock *new_lop = *new_lopp;
3679 if (new_lop->lo_flags & NFSLCK_UNLOCK)
3695 if (lop->lo_end >= new_lop->lo_first) {
3696 if (new_lop->lo_end < lop->lo_first) {
3704 if (new_lop->lo_flags == lop->lo_flags ||
3705 (new_lop->lo_first <= lop->lo_first &&
3706 new_lop->lo_end >= lop->lo_end)) {
3714 if (lop->lo_first < new_lop->lo_first)
3715 new_lop->lo_first = lop->lo_first;
3716 if (lop->lo_end > new_lop->lo_end)
3717 new_lop->lo_end = lop->lo_end;
3728 if (new_lop->lo_first <= lop->lo_first) {
3736 lop->lo_first = new_lop->lo_end;
3739 if (new_lop->lo_end >= lop->lo_end) {
3748 lop->lo_end = new_lop->lo_first;
3758 * For unlock, we use new_lop as other_lop and tmp, since
3759 * other_lop and new_lop are the same for this case.
3761 * new_lop->lo_flags any longer.
3763 tmp = new_lop->lo_first;
3767 other_lop = new_lop;
3770 other_lop->lo_first = new_lop->lo_end;
3792 nfsrv_insertlock(new_lop, ilop, stp, lfp);
5683 struct nfslock *new_lop, *other_lop;
5685 new_lop = malloc(sizeof (struct nfslock), M_NFSDLOCK, M_WAITOK);
5691 new_lop->lo_flags = flags;
5692 new_lop->lo_first = first;
5693 new_lop->lo_end = end;
5694 nfsrv_updatelock(NULL, &new_lop, &other_lop, lfp);
5695 if (new_lop != NULL)
5696 free(new_lop, M_NFSDLOCK);