summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4state.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-27 19:47:21 +0200
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-27 20:00:08 +0200
commit43ac544cb36adf38338c01968f8e3a5f81b7d629 (patch)
tree8abf285176d59f6d251798112ea28ab724d27cea /fs/nfs/nfs4state.c
parentNFSv4.1: Don't clobber the seqid if exchange_id returns a confirmed clientid (diff)
downloadlinux-43ac544cb36adf38338c01968f8e3a5f81b7d629.tar.xz
linux-43ac544cb36adf38338c01968f8e3a5f81b7d629.zip
NFSv4.1: nfs4_bind_conn_to_session should drain the session
In order to avoid races with other RPC calls that end up setting the NFS4CLNT_BIND_CONN_TO_SESSION flag. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r--fs/nfs/nfs4state.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 7dbca666283a..d21ed0309601 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1782,10 +1782,12 @@ static int nfs4_bind_conn_to_session(struct nfs_client *clp)
struct rpc_cred *cred;
int ret;
+ nfs4_begin_drain_session(clp);
cred = nfs4_get_exchange_id_cred(clp);
ret = nfs4_proc_bind_conn_to_session(clp, cred);
if (cred)
put_rpccred(cred);
+ clear_bit(NFS4CLNT_BIND_CONN_TO_SESSION, &clp->cl_state);
return ret;
}
#else /* CONFIG_NFS_V4_1 */