Lines Matching refs:stp

653 	struct nfsstate st, *stp = &st;
682 stp->ls_flags = (NFSLCK_CHECK | NFSLCK_READACCESS);
684 stp->ls_ownerlen = 0;
685 stp->ls_op = NULL;
686 stp->ls_uid = nd->nd_cred->cr_uid;
687 stp->ls_stateid.seqid = fxdr_unsigned(u_int32_t, *tl++);
688 clientid.lval[0] = stp->ls_stateid.other[0] = *tl++;
689 clientid.lval[1] = stp->ls_stateid.other[1] = *tl++;
701 stp->ls_stateid.other[2] = *tl++;
734 nd->nd_repstat = nfsrv_lockctrl(vp, &stp, &lop, NULL, clientid,
816 struct nfsstate st, *stp = &st;
838 stp->ls_flags = (NFSLCK_CHECK | NFSLCK_WRITEACCESS);
840 stp->ls_ownerlen = 0;
841 stp->ls_op = NULL;
842 stp->ls_uid = nd->nd_cred->cr_uid;
843 stp->ls_stateid.seqid = fxdr_unsigned(u_int32_t, *tl++);
844 clientid.lval[0] = stp->ls_stateid.other[0] = *tl++;
845 clientid.lval[1] = stp->ls_stateid.other[1] = *tl++;
857 stp->ls_stateid.other[2] = *tl++;
913 nd->nd_repstat = nfsrv_lockctrl(vp, &stp, &lop, NULL, clientid,
2194 struct nfsstate *stp = NULL;
2235 MALLOC(stp, struct nfsstate *, sizeof (struct nfsstate) + i,
2237 stp->ls_ownerlen = i;
2238 stp->ls_op = nd->nd_rp;
2239 stp->ls_seq = fxdr_unsigned(int, *tl++);
2240 stp->ls_stateid.seqid = fxdr_unsigned(u_int32_t, *tl++);
2241 NFSBCOPY((caddr_t)tl, (caddr_t)stp->ls_stateid.other,
2244 stp->ls_opentolockseq = fxdr_unsigned(int, *tl++);
2258 error = nfsrv_mtostr(nd, stp->ls_owner, stp->ls_ownerlen);
2263 MALLOC(stp, struct nfsstate *, sizeof (struct nfsstate),
2265 stp->ls_ownerlen = 0;
2266 stp->ls_op = nd->nd_rp;
2267 stp->ls_stateid.seqid = fxdr_unsigned(u_int32_t, *tl++);
2268 NFSBCOPY((caddr_t)tl, (caddr_t)stp->ls_stateid.other,
2271 stp->ls_seq = fxdr_unsigned(int, *tl);
2272 clientid.lval[0] = stp->ls_stateid.other[0];
2273 clientid.lval[1] = stp->ls_stateid.other[1];
2297 stp->ls_flags = flags;
2298 stp->ls_uid = nd->nd_cred->cr_uid;
2330 nd->nd_repstat = nfsrv_lockctrl(vp, &stp, &lop, &cf, clientid,
2334 if (stp)
2335 FREE((caddr_t)stp, M_NFSDSTATE);
2363 if (stp)
2364 free((caddr_t)stp, M_NFSDSTATE);
2378 struct nfsstate *stp = NULL;
2392 MALLOC(stp, struct nfsstate *, sizeof (struct nfsstate) + i,
2394 stp->ls_ownerlen = i;
2395 stp->ls_op = NULL;
2396 stp->ls_flags = NFSLCK_TEST;
2397 stp->ls_uid = nd->nd_cred->cr_uid;
2401 stp->ls_flags |= NFSLCK_BLOCKING;
2406 stp->ls_flags |= NFSLCK_BLOCKING;
2438 error = nfsrv_mtostr(nd, stp->ls_owner, stp->ls_ownerlen);
2448 nd->nd_repstat = nfsrv_lockctrl(vp, &stp, &lop, &cf, clientid,
2465 *tl++ = stp->ls_stateid.other[0];
2466 *tl = stp->ls_stateid.other[1];
2471 if (stp)
2472 FREE((caddr_t)stp, M_NFSDSTATE);
2477 if (stp)
2478 free((caddr_t)stp, M_NFSDSTATE);
2492 struct nfsstate *stp;
2500 MALLOC(stp, struct nfsstate *, sizeof (struct nfsstate),
2504 stp->ls_flags = NFSLCK_UNLOCK;
2506 stp->ls_op = nd->nd_rp;
2510 stp->ls_flags |= NFSLCK_BLOCKING;
2514 stp->ls_flags |= NFSLCK_BLOCKING;
2519 free(stp, M_NFSDSTATE);
2523 stp->ls_ownerlen = 0;
2524 stp->ls_uid = nd->nd_cred->cr_uid;
2525 stp->ls_seq = fxdr_unsigned(int, *tl++);
2526 stp->ls_stateid.seqid = fxdr_unsigned(u_int32_t, *tl++);
2527 NFSBCOPY((caddr_t)tl, (caddr_t)stp->ls_stateid.other,
2540 clientid.lval[0] = stp->ls_stateid.other[0];
2541 clientid.lval[1] = stp->ls_stateid.other[1];
2564 nd->nd_repstat = nfsrv_lockctrl(vp, &stp, &lop, NULL, clientid,
2566 if (stp)
2567 FREE((caddr_t)stp, M_NFSDSTATE);
2591 struct nfsstate *stp = NULL;
2619 MALLOC(stp, struct nfsstate *, sizeof (struct nfsstate) + i,
2621 stp->ls_ownerlen = i;
2622 stp->ls_op = nd->nd_rp;
2623 stp->ls_flags = NFSLCK_OPEN;
2624 stp->ls_uid = nd->nd_cred->cr_uid;
2625 stp->ls_seq = fxdr_unsigned(u_int32_t, *tl++);
2635 stp->ls_flags |= (NFSLCK_WANTRDELEG |
2640 stp->ls_flags |= NFSLCK_WANTRDELEG;
2644 stp->ls_flags |= NFSLCK_WANTWDELEG;
2648 stp->ls_flags |= NFSLCK_WANTNODELEG;
2662 stp->ls_flags |= NFSLCK_READACCESS;
2665 stp->ls_flags |= NFSLCK_WRITEACCESS;
2668 stp->ls_flags |= (NFSLCK_READACCESS | NFSLCK_WRITEACCESS);
2678 stp->ls_flags |= NFSLCK_READDENY;
2681 stp->ls_flags |= NFSLCK_WRITEDENY;
2684 stp->ls_flags |= (NFSLCK_READDENY | NFSLCK_WRITEDENY);
2702 error = nfsrv_mtostr(nd, stp->ls_owner, stp->ls_ownerlen);
2780 stp->ls_flags |= NFSLCK_DELEGCUR;
2782 stp->ls_flags |= NFSLCK_DELEGPREV;
2791 &stateid, stp, NULL, nd, p, nd->nd_repstat);
2807 FREE((caddr_t)stp, M_NFSDSTATE);
2847 nfsvno_open(nd, &named, clientid, &stateid, stp,
2857 stp->ls_flags |= NFSLCK_DELEGREAD;
2860 stp->ls_flags |= NFSLCK_DELEGWRITE;
2867 stp->ls_flags |= NFSLCK_RECLAIM;
2877 stp, vp, nd, p, nd->nd_repstat);
2918 if (!nd->nd_repstat && (stp->ls_flags & NFSLCK_WRITEACCESS))
2921 if (!nd->nd_repstat && (stp->ls_flags & NFSLCK_READACCESS)) {
2944 nd->nd_repstat = nfsrv_openctrl(nd, vp, &stp, clientid, &stateid,
2954 if (stp)
2955 FREE((caddr_t)stp, M_NFSDSTATE);
3050 if (stp)
3051 FREE((caddr_t)stp, M_NFSDSTATE);
3064 struct nfsstate st, *stp = &st;
3070 stp->ls_seq = fxdr_unsigned(u_int32_t, *tl++);
3071 stp->ls_ownerlen = 0;
3072 stp->ls_op = nd->nd_rp;
3073 stp->ls_uid = nd->nd_cred->cr_uid;
3074 stp->ls_stateid.seqid = fxdr_unsigned(u_int32_t, *tl++);
3075 NFSBCOPY((caddr_t)tl, (caddr_t)stp->ls_stateid.other,
3077 stp->ls_flags = NFSLCK_CLOSE;
3078 clientid.lval[0] = stp->ls_stateid.other[0];
3079 clientid.lval[1] = stp->ls_stateid.other[1];
3091 nd->nd_repstat = nfsrv_openupdate(vp, stp, clientid, &stateid, nd, p);
3203 struct nfsstate st, *stp = &st;
3213 stp->ls_ownerlen = 0;
3214 stp->ls_op = nd->nd_rp;
3215 stp->ls_uid = nd->nd_cred->cr_uid;
3216 stp->ls_stateid.seqid = fxdr_unsigned(u_int32_t, *tl++);
3217 NFSBCOPY((caddr_t)tl, (caddr_t)stp->ls_stateid.other,
3220 stp->ls_seq = fxdr_unsigned(u_int32_t, *tl);
3221 stp->ls_flags = NFSLCK_CONFIRM;
3222 clientid.lval[0] = stp->ls_stateid.other[0];
3223 clientid.lval[1] = stp->ls_stateid.other[1];
3235 nd->nd_repstat = nfsrv_openupdate(vp, stp, clientid, &stateid, nd, p);
3256 struct nfsstate st, *stp = &st;
3267 stp->ls_ownerlen = 0;
3268 stp->ls_op = nd->nd_rp;
3269 stp->ls_uid = nd->nd_cred->cr_uid;
3270 stp->ls_stateid.seqid = fxdr_unsigned(u_int32_t, *tl++);
3271 NFSBCOPY((caddr_t)tl, (caddr_t)stp->ls_stateid.other,
3274 stp->ls_seq = fxdr_unsigned(u_int32_t, *tl++);
3280 stp->ls_flags = (NFSLCK_READACCESS | NFSLCK_DOWNGRADE);
3283 stp->ls_flags = (NFSLCK_WRITEACCESS | NFSLCK_DOWNGRADE);
3286 stp->ls_flags = (NFSLCK_READACCESS | NFSLCK_WRITEACCESS |
3297 stp->ls_flags |= NFSLCK_READDENY;
3300 stp->ls_flags |= NFSLCK_WRITEDENY;
3303 stp->ls_flags |= (NFSLCK_READDENY | NFSLCK_WRITEDENY);
3309 clientid.lval[0] = stp->ls_stateid.other[0];
3310 clientid.lval[1] = stp->ls_stateid.other[1];
3323 nd->nd_repstat = nfsrv_openupdate(vp, stp, clientid, &stateid,
3743 struct nfsstate *stp = NULL;
3761 MALLOC(stp, struct nfsstate *, sizeof (struct nfsstate) + len,
3763 stp->ls_ownerlen = len;
3764 stp->ls_op = NULL;
3765 stp->ls_flags = NFSLCK_RELEASE;
3766 stp->ls_uid = nd->nd_cred->cr_uid;
3780 error = nfsrv_mtostr(nd, stp->ls_owner, len);
3783 nd->nd_repstat = nfsrv_releaselckown(stp, clientid, p);
3784 FREE((caddr_t)stp, M_NFSDSTATE);
3789 if (stp)
3790 free((caddr_t)stp, M_NFSDSTATE);