From: Trond Myklebust Date: Sat, 5 Dec 2009 20:03:20 +0000 (-0500) Subject: NFSv41: nfs4_reset_session must always set NFS4CLNT_SESSION_DRAINING X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0556d1a6958ba15659ac2089ebc0a3c5e71f08a8;p=linux-beck.git 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: Trond Myklebust --- diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index a86f3acf3212..bc4ca6f4d8c6 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -1211,8 +1211,8 @@ static int nfs4_reset_session(struct nfs_client *clp) INIT_COMPLETION(ses->complete); spin_lock(&tbl->slot_tbl_lock); + set_bit(NFS4CLNT_SESSION_DRAINING, &clp->cl_state); if (tbl->highest_used_slotid != -1) { - set_bit(NFS4CLNT_SESSION_DRAINING, &clp->cl_state); spin_unlock(&tbl->slot_tbl_lock); status = wait_for_completion_interruptible(&ses->complete); if (status) /* -ERESTARTSYS */