Lines Matching defs:stp
646 struct nfsstate st, *stp = &st;
675 stp->ls_flags = (NFSLCK_CHECK | NFSLCK_READACCESS);
677 stp->ls_ownerlen = 0;
678 stp->ls_op = NULL;
679 stp->ls_uid = nd->nd_cred->cr_uid;
680 stp->ls_stateid.seqid = fxdr_unsigned(u_int32_t, *tl++);
681 clientid.lval[0] = stp->ls_stateid.other[0] = *tl++;
682 clientid.lval[1] = stp->ls_stateid.other[1] = *tl++;
694 stp->ls_stateid.other[2] = *tl++;
727 nd->nd_repstat = nfsrv_lockctrl(vp, &stp, &lop, NULL, clientid,
808 struct nfsstate st, *stp = &st;
830 stp->ls_flags = (NFSLCK_CHECK | NFSLCK_WRITEACCESS);
832 stp->ls_ownerlen = 0;
833 stp->ls_op = NULL;
834 stp->ls_uid = nd->nd_cred->cr_uid;
835 stp->ls_stateid.seqid = fxdr_unsigned(u_int32_t, *tl++);
836 clientid.lval[0] = stp->ls_stateid.other[0] = *tl++;
837 clientid.lval[1] = stp->ls_stateid.other[1] = *tl++;
849 stp->ls_stateid.other[2] = *tl++;
905 nd->nd_repstat = nfsrv_lockctrl(vp, &stp, &lop, NULL, clientid,
2185 struct nfsstate *stp = NULL;
2226 MALLOC(stp, struct nfsstate *, sizeof (struct nfsstate) + i,
2228 stp->ls_ownerlen = i;
2229 stp->ls_op = nd->nd_rp;
2230 stp->ls_seq = fxdr_unsigned(int, *tl++);
2231 stp->ls_stateid.seqid = fxdr_unsigned(u_int32_t, *tl++);
2232 NFSBCOPY((caddr_t)tl, (caddr_t)stp->ls_stateid.other,
2235 stp->ls_opentolockseq = fxdr_unsigned(int, *tl++);
2249 error = nfsrv_mtostr(nd, stp->ls_owner, stp->ls_ownerlen);
2254 MALLOC(stp, struct nfsstate *, sizeof (struct nfsstate),
2256 stp->ls_ownerlen = 0;
2257 stp->ls_op = nd->nd_rp;
2258 stp->ls_stateid.seqid = fxdr_unsigned(u_int32_t, *tl++);
2259 NFSBCOPY((caddr_t)tl, (caddr_t)stp->ls_stateid.other,
2262 stp->ls_seq = fxdr_unsigned(int, *tl);
2263 clientid.lval[0] = stp->ls_stateid.other[0];
2264 clientid.lval[1] = stp->ls_stateid.other[1];
2288 stp->ls_flags = flags;
2289 stp->ls_uid = nd->nd_cred->cr_uid;
2321 nd->nd_repstat = nfsrv_lockctrl(vp, &stp, &lop, &cf, clientid,
2325 if (stp)
2326 FREE((caddr_t)stp, M_NFSDSTATE);
2354 if (stp)
2355 free((caddr_t)stp, M_NFSDSTATE);
2369 struct nfsstate *stp = NULL;
2383 MALLOC(stp, struct nfsstate *, sizeof (struct nfsstate) + i,
2385 stp->ls_ownerlen = i;
2386 stp->ls_op = NULL;
2387 stp->ls_flags = NFSLCK_TEST;
2388 stp->ls_uid = nd->nd_cred->cr_uid;
2392 stp->ls_flags |= NFSLCK_BLOCKING;
2397 stp->ls_flags |= NFSLCK_BLOCKING;
2429 error = nfsrv_mtostr(nd, stp->ls_owner, stp->ls_ownerlen);
2439 nd->nd_repstat = nfsrv_lockctrl(vp, &stp, &lop, &cf, clientid,
2456 *tl++ = stp->ls_stateid.other[0];
2457 *tl = stp->ls_stateid.other[1];
2462 if (stp)
2463 FREE((caddr_t)stp, M_NFSDSTATE);
2468 if (stp)
2469 free((caddr_t)stp, M_NFSDSTATE);
2483 struct nfsstate *stp;
2491 MALLOC(stp, struct nfsstate *, sizeof (struct nfsstate),
2495 stp->ls_flags = NFSLCK_UNLOCK;
2497 stp->ls_op = nd->nd_rp;
2501 stp->ls_flags |= NFSLCK_BLOCKING;
2505 stp->ls_flags |= NFSLCK_BLOCKING;
2510 free(stp, M_NFSDSTATE);
2514 stp->ls_ownerlen = 0;
2515 stp->ls_uid = nd->nd_cred->cr_uid;
2516 stp->ls_seq = fxdr_unsigned(int, *tl++);
2517 stp->ls_stateid.seqid = fxdr_unsigned(u_int32_t, *tl++);
2518 NFSBCOPY((caddr_t)tl, (caddr_t)stp->ls_stateid.other,
2531 clientid.lval[0] = stp->ls_stateid.other[0];
2532 clientid.lval[1] = stp->ls_stateid.other[1];
2555 nd->nd_repstat = nfsrv_lockctrl(vp, &stp, &lop, NULL, clientid,
2557 if (stp)
2558 FREE((caddr_t)stp, M_NFSDSTATE);
2582 struct nfsstate *stp = NULL;
2610 MALLOC(stp, struct nfsstate *, sizeof (struct nfsstate) + i,
2612 stp->ls_ownerlen = i;
2613 stp->ls_op = nd->nd_rp;
2614 stp->ls_flags = NFSLCK_OPEN;
2615 stp->ls_uid = nd->nd_cred->cr_uid;
2616 stp->ls_seq = fxdr_unsigned(u_int32_t, *tl++);
2626 stp->ls_flags |= (NFSLCK_WANTRDELEG |
2631 stp->ls_flags |= NFSLCK_WANTRDELEG;
2635 stp->ls_flags |= NFSLCK_WANTWDELEG;
2639 stp->ls_flags |= NFSLCK_WANTNODELEG;
2653 stp->ls_flags |= NFSLCK_READACCESS;
2656 stp->ls_flags |= NFSLCK_WRITEACCESS;
2659 stp->ls_flags |= (NFSLCK_READACCESS | NFSLCK_WRITEACCESS);
2669 stp->ls_flags |= NFSLCK_READDENY;
2672 stp->ls_flags |= NFSLCK_WRITEDENY;
2675 stp->ls_flags |= (NFSLCK_READDENY | NFSLCK_WRITEDENY);
2693 error = nfsrv_mtostr(nd, stp->ls_owner, stp->ls_ownerlen);
2771 stp->ls_flags |= NFSLCK_DELEGCUR;
2773 stp->ls_flags |= NFSLCK_DELEGPREV;
2782 &stateid, stp, NULL, nd, p, nd->nd_repstat);
2798 FREE((caddr_t)stp, M_NFSDSTATE);
2838 nfsvno_open(nd, &named, clientid, &stateid, stp,
2848 stp->ls_flags |= NFSLCK_DELEGREAD;
2851 stp->ls_flags |= NFSLCK_DELEGWRITE;
2858 stp->ls_flags |= NFSLCK_RECLAIM;
2868 stp, vp, nd, p, nd->nd_repstat);
2886 if (!nd->nd_repstat && (stp->ls_flags & NFSLCK_WRITEACCESS))
2889 if (!nd->nd_repstat && (stp->ls_flags & NFSLCK_READACCESS)) {
2912 nd->nd_repstat = nfsrv_openctrl(nd, vp, &stp, clientid, &stateid,
2922 if (stp)
2923 FREE((caddr_t)stp, M_NFSDSTATE);
3012 if (stp)
3013 FREE((caddr_t)stp, M_NFSDSTATE);
3026 struct nfsstate st, *stp = &st;
3032 stp->ls_seq = fxdr_unsigned(u_int32_t, *tl++);
3033 stp->ls_ownerlen = 0;
3034 stp->ls_op = nd->nd_rp;
3035 stp->ls_uid = nd->nd_cred->cr_uid;
3036 stp->ls_stateid.seqid = fxdr_unsigned(u_int32_t, *tl++);
3037 NFSBCOPY((caddr_t)tl, (caddr_t)stp->ls_stateid.other,
3039 stp->ls_flags = NFSLCK_CLOSE;
3040 clientid.lval[0] = stp->ls_stateid.other[0];
3041 clientid.lval[1] = stp->ls_stateid.other[1];
3053 nd->nd_repstat = nfsrv_openupdate(vp, stp, clientid, &stateid, nd, p);
3165 struct nfsstate st, *stp = &st;
3175 stp->ls_ownerlen = 0;
3176 stp->ls_op = nd->nd_rp;
3177 stp->ls_uid = nd->nd_cred->cr_uid;
3178 stp->ls_stateid.seqid = fxdr_unsigned(u_int32_t, *tl++);
3179 NFSBCOPY((caddr_t)tl, (caddr_t)stp->ls_stateid.other,
3182 stp->ls_seq = fxdr_unsigned(u_int32_t, *tl);
3183 stp->ls_flags = NFSLCK_CONFIRM;
3184 clientid.lval[0] = stp->ls_stateid.other[0];
3185 clientid.lval[1] = stp->ls_stateid.other[1];
3197 nd->nd_repstat = nfsrv_openupdate(vp, stp, clientid, &stateid, nd, p);
3218 struct nfsstate st, *stp = &st;
3229 stp->ls_ownerlen = 0;
3230 stp->ls_op = nd->nd_rp;
3231 stp->ls_uid = nd->nd_cred->cr_uid;
3232 stp->ls_stateid.seqid = fxdr_unsigned(u_int32_t, *tl++);
3233 NFSBCOPY((caddr_t)tl, (caddr_t)stp->ls_stateid.other,
3236 stp->ls_seq = fxdr_unsigned(u_int32_t, *tl++);
3240 stp->ls_flags = (NFSLCK_READACCESS | NFSLCK_DOWNGRADE);
3243 stp->ls_flags = (NFSLCK_WRITEACCESS | NFSLCK_DOWNGRADE);
3246 stp->ls_flags = (NFSLCK_READACCESS | NFSLCK_WRITEACCESS |
3257 stp->ls_flags |= NFSLCK_READDENY;
3260 stp->ls_flags |= NFSLCK_WRITEDENY;
3263 stp->ls_flags |= (NFSLCK_READDENY | NFSLCK_WRITEDENY);
3269 clientid.lval[0] = stp->ls_stateid.other[0];
3270 clientid.lval[1] = stp->ls_stateid.other[1];
3283 nd->nd_repstat = nfsrv_openupdate(vp, stp, clientid, &stateid,
3663 struct nfsstate *stp = NULL;
3681 MALLOC(stp, struct nfsstate *, sizeof (struct nfsstate) + len,
3683 stp->ls_ownerlen = len;
3684 stp->ls_op = NULL;
3685 stp->ls_flags = NFSLCK_RELEASE;
3686 stp->ls_uid = nd->nd_cred->cr_uid;
3700 error = nfsrv_mtostr(nd, stp->ls_owner, len);
3703 nd->nd_repstat = nfsrv_releaselckown(stp, clientid, p);
3704 FREE((caddr_t)stp, M_NFSDSTATE);
3709 if (stp)
3710 free((caddr_t)stp, M_NFSDSTATE);