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

Commit 0556d1a6 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

NFSv41: nfs4_reset_session must always set NFS4CLNT_SESSION_DRAINING



Otherwise we have no guarantees that other processes won't start another
RPC call while we're resetting the session.

Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 2597641d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1211,8 +1211,8 @@ static int nfs4_reset_session(struct nfs_client *clp)

	INIT_COMPLETION(ses->complete);
	spin_lock(&tbl->slot_tbl_lock);
	if (tbl->highest_used_slotid != -1) {
	set_bit(NFS4CLNT_SESSION_DRAINING, &clp->cl_state);
	if (tbl->highest_used_slotid != -1) {
		spin_unlock(&tbl->slot_tbl_lock);
		status = wait_for_completion_interruptible(&ses->complete);
		if (status) /* -ERESTARTSYS */