View | Details | Raw Unified | Return to bug 274574
Collapse All | Expand All

(-)sys/fs/nfsserver/nfs_nfsdserv.c (-2 / +8 lines)
Lines 3002-3012 nfsrvd_open(struct nfsrv_descript *nd, __unused int is Link Here
3002
	 */
3002
	 */
3003
	NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED);
3003
	NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED);
3004
	claim = fxdr_unsigned(int, *tl);
3004
	claim = fxdr_unsigned(int, *tl);
3005
	if (claim == NFSV4OPEN_CLAIMDELEGATECUR || claim ==
3005
	if (claim == NFSV4OPEN_CLAIMDELEGATECUR) {
3006
	    NFSV4OPEN_CLAIMDELEGATECURFH) {
3007
		NFSM_DISSECT(tl, u_int32_t *, NFSX_STATEID);
3006
		NFSM_DISSECT(tl, u_int32_t *, NFSX_STATEID);
3008
		stateid.seqid = fxdr_unsigned(u_int32_t, *tl++);
3007
		stateid.seqid = fxdr_unsigned(u_int32_t, *tl++);
3009
		NFSBCOPY((caddr_t)tl,(caddr_t)stateid.other,NFSX_STATEIDOTHER);
3008
		NFSBCOPY((caddr_t)tl,(caddr_t)stateid.other,NFSX_STATEIDOTHER);
3009
		stp->ls_flags |= NFSLCK_DELEGCUR;
3010
	} else if (claim == NFSV4OPEN_CLAIMDELEGATECURFH) {
3011
		/* Fill in most of the stateid from the clientid. */
3012
		stateid.seqid = 0;
3013
		stateid.other[0] = clientid.lval[0];
3014
		stateid.other[1] = clientid.lval[1];
3015
		stateid.other[2] = 0;
3010
		stp->ls_flags |= NFSLCK_DELEGCUR;
3016
		stp->ls_flags |= NFSLCK_DELEGCUR;
3011
	} else if (claim == NFSV4OPEN_CLAIMDELEGATEPREV || claim ==
3017
	} else if (claim == NFSV4OPEN_CLAIMDELEGATEPREV || claim ==
3012
	    NFSV4OPEN_CLAIMDELEGATEPREVFH) {
3018
	    NFSV4OPEN_CLAIMDELEGATEPREVFH) {
(-)sys/fs/nfsserver/nfs_nfsdstate.c (-4 / +12 lines)
Lines 2570-2575 tryagain: Link Here
2570
	    /*
2570
	    /*
2571
	     * For Delegate_Cur, search for the matching Delegation,
2571
	     * For Delegate_Cur, search for the matching Delegation,
2572
	     * which indicates no conflict.
2572
	     * which indicates no conflict.
2573
	     * For NFSv4.1/4.2 Claim_Deleg_Cur_FH only provides
2574
	     * the clientid, which is the first two "other" elements
2575
	     * for the stateid.  This should be sufficient, since there
2576
	     * is only one delegation per client and file.
2573
	     * An old delegation should have been recovered by the
2577
	     * An old delegation should have been recovered by the
2574
	     * client doing a Claim_DELEGATE_Prev, so I won't let
2578
	     * client doing a Claim_DELEGATE_Prev, so I won't let
2575
	     * it match and return NFSERR_EXPIRED. Should I let it
2579
	     * it match and return NFSERR_EXPIRED. Should I let it
Lines 2580-2587 tryagain: Link Here
2580
		    (((nd->nd_flag & ND_NFSV41) != 0 &&
2584
		    (((nd->nd_flag & ND_NFSV41) != 0 &&
2581
		    stateidp->seqid == 0) ||
2585
		    stateidp->seqid == 0) ||
2582
		    stateidp->seqid == stp->ls_stateid.seqid) &&
2586
		    stateidp->seqid == stp->ls_stateid.seqid) &&
2583
		    !NFSBCMP(stateidp->other, stp->ls_stateid.other,
2587
		    stateidp->other[0] == stp->ls_stateid.other[0] &&
2584
			  NFSX_STATEIDOTHER))
2588
		    stateidp->other[1] == stp->ls_stateid.other[1])
2585
			break;
2589
			break;
2586
	    }
2590
	    }
2587
	    if (stp == LIST_END(&lfp->lf_deleg) ||
2591
	    if (stp == LIST_END(&lfp->lf_deleg) ||
Lines 2832-2837 tryagain: Link Here
2832
	    /*
2836
	    /*
2833
	     * For Delegate_Cur, search for the matching Delegation,
2837
	     * For Delegate_Cur, search for the matching Delegation,
2834
	     * which indicates no conflict.
2838
	     * which indicates no conflict.
2839
	     * For NFSv4.1/4.2 Claim_Deleg_Cur_FH only provides
2840
	     * the clientid, which is the first two "other" elements
2841
	     * for the stateid.  This should be sufficient, since there
2842
	     * is only one delegation per client and file.
2835
	     * An old delegation should have been recovered by the
2843
	     * An old delegation should have been recovered by the
2836
	     * client doing a Claim_DELEGATE_Prev, so I won't let
2844
	     * client doing a Claim_DELEGATE_Prev, so I won't let
2837
	     * it match and return NFSERR_EXPIRED. Should I let it
2845
	     * it match and return NFSERR_EXPIRED. Should I let it
Lines 2842-2849 tryagain: Link Here
2842
		    (((nd->nd_flag & ND_NFSV41) != 0 &&
2850
		    (((nd->nd_flag & ND_NFSV41) != 0 &&
2843
		    stateidp->seqid == 0) ||
2851
		    stateidp->seqid == 0) ||
2844
		    stateidp->seqid == stp->ls_stateid.seqid) &&
2852
		    stateidp->seqid == stp->ls_stateid.seqid) &&
2845
		    !NFSBCMP(stateidp->other, stp->ls_stateid.other,
2853
		    stateidp->other[0] == stp->ls_stateid.other[0] &&
2846
			NFSX_STATEIDOTHER))
2854
		    stateidp->other[1] == stp->ls_stateid.other[1])
2847
			break;
2855
			break;
2848
	    }
2856
	    }
2849
	    if (stp == LIST_END(&lfp->lf_deleg) ||
2857
	    if (stp == LIST_END(&lfp->lf_deleg) ||

Return to bug 274574