Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320194
b: refs/heads/master
c: 1a47e7a
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jun 28, 2012
1 parent b8eeb53 commit 8fb362c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 60f00153d93e0bea872f1a9f5b01423247649083
refs/heads/master: 1a47e7a6662f155c8118d64737086a72cf34edf1
9 changes: 6 additions & 3 deletions trunk/fs/nfs/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1764,6 +1764,8 @@ static int nfs4_reset_session(struct nfs_client *clp)
struct rpc_cred *cred;
int status;

if (!nfs4_has_session(clp))
return 0;
nfs4_begin_drain_session(clp);
cred = nfs4_get_exchange_id_cred(clp);
status = nfs4_proc_destroy_session(clp->cl_session, cred);
Expand Down Expand Up @@ -1824,6 +1826,8 @@ static int nfs4_bind_conn_to_session(struct nfs_client *clp)
struct rpc_cred *cred;
int ret;

if (!nfs4_has_session(clp))
return 0;
nfs4_begin_drain_session(clp);
cred = nfs4_get_exchange_id_cred(clp);
ret = nfs4_proc_bind_conn_to_session(clp, cred);
Expand Down Expand Up @@ -1901,8 +1905,7 @@ static void nfs4_state_manager(struct nfs_client *clp)
}

/* Initialize or reset the session */
if (test_and_clear_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state)
&& nfs4_has_session(clp)) {
if (test_and_clear_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state)) {
section = "reset session";
status = nfs4_reset_session(clp);
if (test_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state))
Expand All @@ -1913,7 +1916,7 @@ static void nfs4_state_manager(struct nfs_client *clp)

/* Send BIND_CONN_TO_SESSION */
if (test_and_clear_bit(NFS4CLNT_BIND_CONN_TO_SESSION,
&clp->cl_state) && nfs4_has_session(clp)) {
&clp->cl_state)) {
section = "bind conn to session";
status = nfs4_bind_conn_to_session(clp);
if (status < 0)
Expand Down

0 comments on commit 8fb362c

Please sign in to comment.