Home | History | Annotate | Download | only in server

Lines Matching defs:stp

97 static void nfsrv_freeopenowner(struct nfsstate *stp, int cansleep,
99 static int nfsrv_freeopen(struct nfsstate *stp, vnode_t vp, int cansleep,
101 static void nfsrv_freelockowner(struct nfsstate *stp, vnode_t vp, int cansleep,
103 static void nfsrv_freeallnfslocks(struct nfsstate *stp, vnode_t vp,
117 struct nfslock *insert_lop, struct nfsstate *stp, struct nfslockfile *lfp);
118 static void nfsrv_updatelock(struct nfsstate *stp, struct nfslock **new_lopp,
136 static int nfsrv_delegconflict(struct nfsstate *stp, int *haslockp,
143 static void nfsrv_delaydelegtimeout(struct nfsstate *stp);
145 struct nfsstate *stp, struct nfsrvcache *op);
146 static int nfsrv_nootherstate(struct nfsstate *stp);
178 struct nfsstate *stp, *tstp;
318 LIST_FOREACH(stp, &clp->lc_open, ls_list) {
319 if (!LIST_EMPTY(&stp->ls_open)) {
488 struct nfsstate *stp;
597 LIST_FOREACH(stp, &clp->lc_deleg, ls_list)
598 stp->ls_flags |= NFSLCK_OLDDELEG;
653 LIST_FOREACH(stp, &clp->lc_stateid[i], ls_hash) {
654 if ((stp->ls_flags & NFSLCK_OPEN) &&
655 stp->ls_uid == nd->nd_cred->cr_uid) {
866 struct nfsstate *stp, *openstp, *lckownstp;
891 LIST_FOREACH(stp, &clp->lc_open, ls_list) {
893 LIST_FOREACH(openstp, &stp->ls_open, ls_list) {
907 LIST_FOREACH(stp, &clp->lc_deleg, ls_list) {
910 LIST_FOREACH(stp, &clp->lc_olddeleg, ls_list) {
922 struct nfsstate *stp;
955 stp = LIST_FIRST(&lfp->lf_open);
956 while (stp != NULL && cnt < maxcnt) {
957 ldumpp[cnt].ndlck_flags = stp->ls_flags;
958 ldumpp[cnt].ndlck_stateid.seqid = stp->ls_stateid.seqid;
959 ldumpp[cnt].ndlck_stateid.other[0] = stp->ls_stateid.other[0];
960 ldumpp[cnt].ndlck_stateid.other[1] = stp->ls_stateid.other[1];
961 ldumpp[cnt].ndlck_stateid.other[2] = stp->ls_stateid.other[2];
963 stp->ls_openowner->ls_ownerlen;
964 NFSBCOPY(stp->ls_openowner->ls_owner,
966 stp->ls_openowner->ls_ownerlen);
967 ldumpp[cnt].ndlck_clid.nclid_idlen = stp->ls_clp->lc_idlen;
968 NFSBCOPY(stp->ls_clp->lc_id, ldumpp[cnt].ndlck_clid.nclid_id,
969 stp->ls_clp->lc_idlen);
970 sad=NFSSOCKADDR(stp->ls_clp->lc_req.nr_nam, struct sockaddr *);
979 stp = LIST_NEXT(stp, ls_file);
988 stp = lop->lo_stp;
992 ldumpp[cnt].ndlck_stateid.seqid = stp->ls_stateid.seqid;
993 ldumpp[cnt].ndlck_stateid.other[0] = stp->ls_stateid.other[0];
994 ldumpp[cnt].ndlck_stateid.other[1] = stp->ls_stateid.other[1];
995 ldumpp[cnt].ndlck_stateid.other[2] = stp->ls_stateid.other[2];
996 ldumpp[cnt].ndlck_owner.nclid_idlen = stp->ls_ownerlen;
997 NFSBCOPY(stp->ls_owner, ldumpp[cnt].ndlck_owner.nclid_id,
998 stp->ls_ownerlen);
999 ldumpp[cnt].ndlck_clid.nclid_idlen = stp->ls_clp->lc_idlen;
1000 NFSBCOPY(stp->ls_clp->lc_id, ldumpp[cnt].ndlck_clid.nclid_id,
1001 stp->ls_clp->lc_idlen);
1002 sad=NFSSOCKADDR(stp->ls_clp->lc_req.nr_nam, struct sockaddr *);
1018 stp = LIST_FIRST(&lfp->lf_deleg);
1019 while (stp != NULL && cnt < maxcnt) {
1020 ldumpp[cnt].ndlck_flags = stp->ls_flags;
1021 ldumpp[cnt].ndlck_stateid.seqid = stp->ls_stateid.seqid;
1022 ldumpp[cnt].ndlck_stateid.other[0] = stp->ls_stateid.other[0];
1023 ldumpp[cnt].ndlck_stateid.other[1] = stp->ls_stateid.other[1];
1024 ldumpp[cnt].ndlck_stateid.other[2] = stp->ls_stateid.other[2];
1026 ldumpp[cnt].ndlck_clid.nclid_idlen = stp->ls_clp->lc_idlen;
1027 NFSBCOPY(stp->ls_clp->lc_id, ldumpp[cnt].ndlck_clid.nclid_id,
1028 stp->ls_clp->lc_idlen);
1029 sad=NFSSOCKADDR(stp->ls_clp->lc_req.nr_nam, struct sockaddr *);
1038 stp = LIST_NEXT(stp, ls_file);
1067 struct nfsstate *stp, *nstp;
1154 stp = LIST_FIRST(&clp->lc_open);
1155 while (stp != NULL) {
1156 nstp = LIST_NEXT(stp, ls_list);
1157 if (LIST_EMPTY(&stp->ls_open)) {
1158 stp->ls_noopens++;
1159 if (stp->ls_noopens > NFSNOOPEN ||
1165 stp->ls_noopens = 0;
1167 stp = nstp;
1191 struct nfsstate *stp, *nstp;
1194 LIST_FOREACH_SAFE(stp, &clp->lc_open, ls_list, nstp)
1195 nfsrv_freeopenowner(stp, 1, p);
1242 struct nfsstate *stp, *nstp;
1244 LIST_FOREACH_SAFE(stp, sthp, ls_list, nstp) {
1245 nfsrv_freedeleg(stp);
1254 nfsrv_freedeleg(struct nfsstate *stp)
1258 LIST_REMOVE(stp, ls_hash);
1259 LIST_REMOVE(stp, ls_list);
1260 LIST_REMOVE(stp, ls_file);
1261 lfp = stp->ls_lfp;
1268 FREE((caddr_t)stp, M_NFSDSTATE);
1278 nfsrv_freeopenowner(struct nfsstate *stp, int cansleep, NFSPROC_T *p)
1282 LIST_REMOVE(stp, ls_list);
1286 nstp = LIST_FIRST(&stp->ls_open);
1292 if (stp->ls_op)
1293 nfsrvd_derefcache(stp->ls_op);
1294 FREE((caddr_t)stp, M_NFSDSTATE);
1306 nfsrv_freeopen(struct nfsstate *stp, vnode_t vp, int cansleep, NFSPROC_T *p)
1312 LIST_REMOVE(stp, ls_hash);
1313 LIST_REMOVE(stp, ls_list);
1314 LIST_REMOVE(stp, ls_file);
1316 lfp = stp->ls_lfp;
1320 LIST_FOREACH_SAFE(tstp, &stp->ls_open, ls_list, nstp)
1344 FREE((caddr_t)stp, M_NFSDSTATE);
1354 nfsrv_freelockowner(struct nfsstate *stp, vnode_t vp, int cansleep,
1358 LIST_REMOVE(stp, ls_hash);
1359 LIST_REMOVE(stp, ls_list);
1360 nfsrv_freeallnfslocks(stp, vp, cansleep, p);
1361 if (stp->ls_op)
1362 nfsrvd_derefcache(stp->ls_op);
1363 FREE((caddr_t)stp, M_NFSDSTATE);
1372 nfsrv_freeallnfslocks(struct nfsstate *stp, vnode_t vp, int cansleep,
1384 lop = LIST_FIRST(&stp->ls_lock);
1464 struct nfsstate *stp;
1470 LIST_FOREACH(stp, hp, ls_hash) {
1471 if (!NFSBCMP(stp->ls_stateid.other, stateidp->other,
1479 if (stp == NULL) {
1483 *stpp = stp;
1497 struct nfsstate *stp;
1500 LIST_FOREACH(stp, hp, ls_list) {
1501 if (new_stp->ls_ownerlen == stp->ls_ownerlen &&
1502 !NFSBCMP(new_stp->ls_owner,stp->ls_owner,stp->ls_ownerlen)) {
1503 *stpp = stp;
1534 struct nfsstate *stp, *lckstp = NULL;
1667 new_stp->ls_flags, &stp);
1672 if (error == 0 && (stp->ls_flags & NFSLCK_OPEN) &&
1673 ((stp->ls_openowner->ls_flags & NFSLCK_NEEDSCONFIRM) ||
1674 (getlckret == 0 && stp->ls_lfp != lfp))){
1685 (stp->ls_flags & (NFSLCK_DELEGREAD | NFSLCK_DELEGWRITE)) &&
1686 getlckret == 0 && stp->ls_lfp != lfp)
1697 if (error == 0 && (stp->ls_flags &
1699 getlckret == 0 && stp->ls_lfp != lfp) {
1714 if (stp->ls_flags & NFSLCK_OPEN)
1716 stp->ls_openowner, new_stp->ls_op);
1721 nfsrv_getowner(&stp->ls_open, new_stp, &lckstp);
1736 if (stp->ls_flags & NFSLCK_OPEN)
1740 stp, new_stp->ls_op);
1742 lckstp = stp;
1744 lckstp = stp;
1757 if (!error && stp->ls_stateid.seqid!=new_stp->ls_stateid.seqid &&
1859 if (stp->ls_flags & (NFSLCK_DELEGREAD | NFSLCK_DELEGWRITE)) {
1861 mystp = stp;
1862 nfsrv_delaydelegtimeout(stp);
1863 } else if (stp->ls_flags & NFSLCK_OPEN) {
1864 mystp = stp;
1866 mystp = stp->ls_openstp;
2043 nfsrv_updatelock(stp, new_lopp, &other_lop, lfp);
2044 stateidp->seqid = ++(stp->ls_stateid.seqid);
2046 stateidp->seqid = stp->ls_stateid.seqid = 1;
2047 stateidp->other[0] = stp->ls_stateid.other[0];
2048 stateidp->other[1] = stp->ls_stateid.other[1];
2049 stateidp->other[2] = stp->ls_stateid.other[2];
2200 new_stp->ls_openstp = stp;
2206 LIST_INSERT_HEAD(&stp->ls_open, new_stp, ls_list);
2247 struct nfsstate *stp, *nstp;
2376 LIST_FOREACH(stp, &lfp->lf_deleg, ls_file) {
2377 if (!(stp->ls_flags & NFSLCK_OLDDELEG) &&
2380 stateidp->seqid == stp->ls_stateid.seqid) &&
2381 !NFSBCMP(stateidp->other, stp->ls_stateid.other,
2385 if (stp == NULL ||
2387 (stp->ls_flags & NFSLCK_DELEGREAD))) {
2403 LIST_FOREACH(stp, &lfp->lf_open, ls_file) {
2406 ((stp->ls_flags>>NFSLCK_SHIFT) & NFSLCK_ACCESSBITS))||
2407 ((stp->ls_flags & NFSLCK_ACCESSBITS) &
2409 ret = nfsrv_clientconflict(stp->ls_clp,&haslock,vp,p);
2456 stp = LIST_FIRST(&lfp->lf_deleg);
2457 while (stp != NULL) {
2458 nstp = LIST_NEXT(stp, ls_file);
2459 if ((readonly && stp->ls_clp != clp &&
2460 (stp->ls_flags & NFSLCK_DELEGWRITE)) ||
2461 (!readonly && (stp->ls_clp != clp ||
2462 (stp->ls_flags & NFSLCK_DELEGREAD)))) {
2463 ret = nfsrv_delegconflict(stp, &haslock, p, vp);
2475 stp = nstp;
2500 struct nfsstate *stp, *nstp;
2635 LIST_FOREACH(stp, &lfp->lf_deleg, ls_file) {
2636 if (!(stp->ls_flags & NFSLCK_OLDDELEG) &&
2639 stateidp->seqid == stp->ls_stateid.seqid) &&
2640 !NFSBCMP(stateidp->other, stp->ls_stateid.other,
2644 if (stp == NULL ||
2646 (stp->ls_flags & NFSLCK_DELEGREAD))) {
2665 nfsrv_delaydelegtimeout(stp);
2675 LIST_FOREACH(stp, &lfp->lf_open, ls_file) {
2676 if (ownerstp && stp->ls_openowner == ownerstp)
2677 openstp = stp;
2684 if (clp != stp->ls_clp) {
2685 if ((stp->ls_flags & NFSLCK_SHAREBITS) ==
2692 ((stp->ls_flags>>NFSLCK_SHIFT) & NFSLCK_ACCESSBITS))||
2693 ((stp->ls_flags & NFSLCK_ACCESSBITS) &
2695 ret = nfsrv_clientconflict(stp->ls_clp,&haslock,vp,p);
2746 stp = LIST_FIRST(&lfp->lf_deleg);
2747 while (stp != NULL) {
2748 nstp = LIST_NEXT(stp, ls_file);
2749 if (stp->ls_clp != clp && (stp->ls_flags & NFSLCK_DELEGREAD))
2753 if ((readonly && stp->ls_clp != clp &&
2754 (stp->ls_flags & NFSLCK_DELEGWRITE)) ||
2755 (!readonly && (stp->ls_clp != clp ||
2756 (stp->ls_flags & NFSLCK_DELEGREAD)))) {
2760 ret = nfsrv_delegconflict(stp, &haslock, p, vp);
2778 stp = nstp;
2796 LIST_FOREACH(stp, &clp->lc_olddeleg, ls_list) {
2797 if (stp->ls_lfp == lfp) {
2799 if (stp->ls_clp != clp)
2801 LIST_REMOVE(stp, ls_list);
2802 LIST_REMOVE(stp, ls_hash);
2803 stp->ls_flags &= ~NFSLCK_OLDDELEG;
2804 stp->ls_stateid.seqid = delegstateidp->seqid = 1;
2805 stp->ls_stateid.other[0] = delegstateidp->other[0] =
2807 stp->ls_stateid.other[1] = delegstateidp->other[1] =
2809 stp->ls_stateid.other[2] = delegstateidp->other[2] =
2811 stp->ls_compref = nd->nd_compref;
2812 LIST_INSERT_HEAD(&clp->lc_deleg, stp, ls_list);
2814 stp->ls_stateid), stp, ls_hash);
2815 if (stp->ls_flags & NFSLCK_DELEGWRITE)
2831 if (stp->ls_flags & NFSLCK_DELEGWRITE)
2868 if (stp == NULL)
2877 LIST_FOREACH(stp, &lfp->lf_deleg, ls_file) {
2878 if (stp->ls_clp == clp)
2881 if (stp == NULL && openstp == NULL) {
2981 stp = LIST_FIRST(&ownerstp->ls_open);
2982 stp->ls_flags = (new_stp->ls_flags & NFSLCK_SHAREBITS) |
2984 stp->ls_stateid.seqid = 1;
2985 stp->ls_uid = new_stp->ls_uid;
2986 if (lfp != stp->ls_lfp) {
2987 LIST_REMOVE(stp, ls_file);
2988 LIST_INSERT_HEAD(&lfp->lf_open, stp, ls_file);
2989 stp->ls_lfp = lfp;
2991 openstp = stp;
3234 struct nfsstate *stp, *ownerstp;
3257 new_stp->ls_flags, &stp);
3262 if (!error && (!(stp->ls_flags & NFSLCK_OPEN) ||
3264 (stp->ls_openowner->ls_flags & NFSLCK_NEEDSCONFIRM)) ||
3266 (!(stp->ls_openowner->ls_flags & NFSLCK_NEEDSCONFIRM)))))
3271 stp->ls_openowner, new_stp->ls_op);
3272 if (!error && stp->ls_stateid.seqid != new_stp->ls_stateid.seqid &&
3294 nfsrv_nootherstate(stp))
3295 nfsrv_freeopenowner(stp->ls_openowner, 0, p);
3303 stateidp->seqid = stp->ls_stateid.seqid + 1;
3306 stateidp->other[0] = stp->ls_stateid.other[0];
3307 stateidp->other[1] = stp->ls_stateid.other[1];
3308 stateidp->other[2] = stp->ls_stateid.other[2];
3317 if (!(stp->ls_openowner->ls_flags & NFSLCK_NEEDSCONFIRM))
3319 stp->ls_openowner->ls_flags = 0;
3320 stp->ls_stateid.seqid++;
3322 stp->ls_stateid.seqid == 0)
3323 stp->ls_stateid.seqid = 1;
3332 ownerstp = stp->ls_openowner;
3333 lfp = stp->ls_lfp;
3334 if (nfsrv_dolocallocks != 0 && !LIST_EMPTY(&stp->ls_open)) {
3340 if (nfsrv_freeopen(stp, vp, 1, p) == 0) {
3347 (void) nfsrv_freeopen(stp, NULL, 0, p);
3356 if (~(stp->ls_flags) & bits) {
3361 stp->ls_flags = (bits | NFSLCK_OPEN);
3362 stp->ls_stateid.seqid++;
3364 stp->ls_stateid.seqid == 0)
3365 stp->ls_stateid.seqid = 1;
3391 struct nfsstate *stp;
3428 error = nfsrv_getstate(clp, stateidp, NFSLCK_DELEGRETURN, &stp);
3429 if (!error && stp->ls_stateid.seqid != stateidp->seqid &&
3448 if (NFSBCMP((caddr_t)&fh, (caddr_t)&stp->ls_lfp->lf_fh,
3454 nfsrv_freedeleg(stp);
3473 struct nfsstate *stp, *nstp, *openstp, *ownstp;
3497 stp = LIST_FIRST(&openstp->ls_open);
3498 while (stp != NULL) {
3499 nstp = LIST_NEXT(stp, ls_list);
3504 if (stp->ls_ownerlen == new_stp->ls_ownerlen &&
3505 !NFSBCMP(stp->ls_owner, new_stp->ls_owner,
3506 stp->ls_ownerlen)){
3507 if (LIST_EMPTY(&stp->ls_lock)) {
3508 nfsrv_freelockowner(stp, NULL, 0, p);
3515 stp = nstp;
3617 struct nfsstate *stp, struct nfslockfile *lfp)
3621 new_lop->lo_stp = stp;
3624 if (stp != NULL) {
3644 * Insert after insert_lop, which is overloaded as stp or lfp for
3647 if (stp == NULL && (struct nfslockfile *)insert_lop == lfp)
3649 else if ((struct nfsstate *)insert_lop == stp)
3650 LIST_INSERT_HEAD(&stp->ls_lock, new_lop, lo_lckowner);
3653 if (stp != NULL) {
3667 nfsrv_updatelock(struct nfsstate *stp, struct nfslock **new_lopp,
3681 if (stp != NULL) {
3682 ilop = (struct nfslock *)stp;
3683 lop = LIST_FIRST(&stp->ls_lock);
3773 other_lop->lo_stp = stp;
3776 nfsrv_insertlock(other_lop, lop, stp, lfp);
3792 nfsrv_insertlock(new_lop, ilop, stp, lfp);
3803 struct nfsstate *stp, struct nfsrvcache *op)
3814 if (stp->ls_op && stp->ls_op->rc_refcnt <= 0) {
3815 printf("refcnt=%d\n", stp->ls_op->rc_refcnt);
3818 if ((stp->ls_seq + 1) == seqid) {
3819 if (stp->ls_op)
3820 nfsrvd_derefcache(stp->ls_op);
3821 stp->ls_op = op;
3823 stp->ls_seq = seqid;
3825 } else if (stp->ls_seq == seqid && stp->ls_op &&
3826 op->rc_xid == stp->ls_op->rc_xid &&
3828 op->rc_reqlen == stp->ls_op->rc_reqlen &&
3829 op->rc_cksum == stp->ls_op->rc_cksum) {
3830 stp->ls_op->rc_flag & RC_INPROG) {
3834 nd->nd_rp = stp->ls_op;
4333 struct nfsstate *stp;
4350 LIST_FOREACH(stp, &clp->lc_stateid[i], ls_hash) {
4351 if (stp->ls_stateid.other[2] > 0x80000000) {
4352 if (stp->ls_stateid.other[2] < max_index)
4353 max_index = stp->ls_stateid.other[2];
4355 if (stp->ls_stateid.other[2] > min_index)
4356 min_index = stp->ls_stateid.other[2];
4374 LIST_FOREACH(stp, &clp->lc_stateid[i], ls_hash) {
4375 if (stp->ls_stateid.other[2] == canuse) {
4810 nfsrv_delegconflict(struct nfsstate *stp, int *haslockp, NFSPROC_T *p,
4813 struct nfsclient *clp = stp->ls_clp;
4821 if (stp->ls_flags & NFSLCK_OLDDELEG) {
4826 nfsrv_freedeleg(stp);
4853 if (!(stp->ls_flags & NFSLCK_DELEGRECALL)) {
4868 stp->ls_delegtime = NFSD_MONOSEC + (2 * nfsrv_lease) +
4870 stp->ls_delegtimelimit = NFSD_MONOSEC + (6 * nfsrv_lease) +
4872 stp->ls_flags |= NFSLCK_DELEGRECALL;
4880 * Since nfsrv_docallback will sleep, don't use stp after
4883 NFSBCOPY((caddr_t)&stp->ls_stateid, (caddr_t)&tstateid,
4885 NFSBCOPY((caddr_t)&stp->ls_lfp->lf_fh, (caddr_t)&tfh,
4906 stp->ls_delegtime >= NFSD_MONOSEC) {
4975 nfsrv_freedeleg(stp);
4994 struct nfsstate *stp;
5048 LIST_FOREACH(stp, &lfp->lf_open, ls_file) {
5049 if (stp->ls_flags & NFSLCK_WRITEDENY) {
5081 struct nfsstate *stp, *nstp;
5084 stp = LIST_FIRST(&lfp->lf_deleg);
5085 while (stp != NULL) {
5086 nstp = LIST_NEXT(stp, ls_file);
5087 if (stp->ls_clp != clp) {
5088 ret = nfsrv_delegconflict(stp, haslockp, p, vp);
5097 stp = nstp;
5211 struct nfsstate st, *stp = &st;
5217 stp->ls_flags = (NFSLCK_CHECK | NFSLCK_WRITEACCESS);
5220 stp->ls_flags = 0;
5227 stp->ls_flags |= NFSLCK_SETATTR;
5228 if (stp->ls_flags == 0)
5232 stp->ls_ownerlen = 0;
5233 stp->ls_op = NULL;
5234 stp->ls_uid = nd->nd_cred->cr_uid;
5235 stp->ls_stateid.seqid = stateidp->seqid;
5236 clientid.lval[0] = stp->ls_stateid.other[0] = stateidp->other[0];
5237 clientid.lval[1] = stp->ls_stateid.other[1] = stateidp->other[1];
5238 stp->ls_stateid.other[2] = stateidp->other[2];
5239 error = nfsrv_lockctrl(vp, &stp, &lop, NULL, clientid,
5258 struct nfsstate *stp;
5289 LIST_FOREACH(stp, &lfp->lf_deleg, ls_file) {
5290 if (stp->ls_flags & NFSLCK_DELEGWRITE)
5293 if (stp == NULL) {
5297 clp = stp->ls_clp;
5298 delegfilerev = stp->ls_filerev;
5310 if (nd->nd_compref == stp->ls_compref ||
5362 struct nfsstate *stp, *nstp;
5372 LIST_FOREACH_SAFE(stp, &clp->lc_open, ls_list, nstp) {
5373 if (LIST_EMPTY(&stp->ls_open) &&
5374 (stp->ls_noopens > NFSNOOPEN ||
5377 nfsrv_freeopenowner(stp, 0, p);
5436 nfsrv_delaydelegtimeout(struct nfsstate *stp)
5439 if ((stp->ls_flags & NFSLCK_DELEGRECALL) == 0)
5442 if ((stp->ls_delegtime + 15) > NFSD_MONOSEC &&
5443 stp->ls_delegtime < stp->ls_delegtimelimit) {
5444 stp->ls_delegtime += nfsrv_lease;
5445 if (stp->ls_delegtime > stp->ls_delegtimelimit)
5446 stp->ls_delegtime = stp->ls_delegtimelimit;
5456 nfsrv_nootherstate(struct nfsstate *stp)
5460 LIST_FOREACH(tstp, &stp->ls_openowner->ls_open, ls_list) {
5461 if (tstp != stp || !LIST_EMPTY(&tstp->ls_lock))
5975 struct nfsstate *stp;
5986 LIST_FOREACH(stp, &clp->lc_deleg, ls_list) {
5987 if (!NFSBCMP(stp->ls_stateid.other, stateidp->other,
5991 if (stp != NULL) {
5992 nfsrv_freedeleg(stp);
5999 error = nfsrv_getstate(clp, stateidp, 0, &stp);
6000 if (error == 0 && ((stp->ls_flags & (NFSLCK_OPEN | NFSLCK_DELEGREAD |
6001 NFSLCK_DELEGWRITE)) != 0 || (stp->ls_flags & NFSLCK_LOCK) == 0))
6004 if (error == 0 && !LIST_EMPTY(&stp->ls_lock))
6007 nfsrv_freelockowner(stp, NULL, 0, p);