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>
This commit is contained in:
parent
32b0131069
commit
43ac544cb3
1 changed files with 2 additions and 0 deletions
|
@ -1782,10 +1782,12 @@ static int nfs4_bind_conn_to_session(struct nfs_client *clp)
|
||||||
struct rpc_cred *cred;
|
struct rpc_cred *cred;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
nfs4_begin_drain_session(clp);
|
||||||
cred = nfs4_get_exchange_id_cred(clp);
|
cred = nfs4_get_exchange_id_cred(clp);
|
||||||
ret = nfs4_proc_bind_conn_to_session(clp, cred);
|
ret = nfs4_proc_bind_conn_to_session(clp, cred);
|
||||||
if (cred)
|
if (cred)
|
||||||
put_rpccred(cred);
|
put_rpccred(cred);
|
||||||
|
clear_bit(NFS4CLNT_BIND_CONN_TO_SESSION, &clp->cl_state);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#else /* CONFIG_NFS_V4_1 */
|
#else /* CONFIG_NFS_V4_1 */
|
||||||
|
|
Loading…
Add table
Reference in a new issue