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

Commit e1fff5df authored by Trond Myklebust's avatar Trond Myklebust Committed by Anna Schumaker
Browse files

NFSv4: nfs_set_open_stateid must not trigger state recovery for closed state



In nfs_set_open_stateid_locked, we must ignore stateids from closed state.

Reported-by: default avatarAndrew W Elble <aweits@rit.edu>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent 46280d9d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1541,7 +1541,8 @@ static void nfs_set_open_stateid_locked(struct nfs4_state *state,
		write_seqlock(&state->seqlock);
	}

	if (!nfs4_stateid_match_other(stateid, &state->open_stateid)) {
	if (test_bit(NFS_OPEN_STATE, &state->flags) &&
	    !nfs4_stateid_match_other(stateid, &state->open_stateid)) {
		nfs4_stateid_copy(freeme, &state->open_stateid);
		nfs_test_and_clear_all_open_stateid(state);
	}