Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 74dbafaf authored by J. Bruce Fields's avatar J. Bruce Fields
Browse files

nfsd4: release openowners on free in >=4.1 case



We don't need to keep openowners around in the >=4.1 case, because they
aren't needed to handle CLOSE replays any more (that's a problem for
sessions).  And doing so causes unexpected failures on a subsequent
destroy_clientid to fail.

We probably also need something comparable for lock owners on last
unlock.

Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 2930d381
Loading
Loading
Loading
Loading
+13 −6
Original line number Original line Diff line number Diff line
@@ -3763,12 +3763,19 @@ nfsd4_close(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
	nfsd4_close_open_stateid(stp);
	nfsd4_close_open_stateid(stp);
	oo->oo_last_closed_stid = stp;
	oo->oo_last_closed_stid = stp;


	/* place unused nfs4_stateowners on so_close_lru list to be
	if (list_empty(&oo->oo_owner.so_stateids)) {
	 * released by the laundromat service after the lease period
		if (cstate->minorversion) {
	 * to enable us to handle CLOSE replay
			release_openowner(oo);
			cstate->replay_owner = NULL;
		} else {
			/*
			 * In the 4.0 case we need to keep the owners around a
			 * little while to handle CLOSE replay.
			 */
			 */
			if (list_empty(&oo->oo_owner.so_stateids))
			if (list_empty(&oo->oo_owner.so_stateids))
				move_to_close_lru(oo);
				move_to_close_lru(oo);
		}
	}
out:
out:
	if (!cstate->replay_owner)
	if (!cstate->replay_owner)
		nfs4_unlock_state();
		nfs4_unlock_state();