Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 372175
b: refs/heads/master
c: abcdff0
h: refs/heads/master
i:
  372173: c7d8d7e
  372171: 1c955ed
  372167: e208a65
  372159: e2c2b44
v: v3
  • Loading branch information
J. Bruce Fields committed Apr 3, 2013
1 parent e7a4618 commit ca67524
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 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: bfa85e83a87aec71cbb231256eaad7341aa8b4fa
refs/heads/master: abcdff09a05117112aa22cd84939039655bca710
26 changes: 10 additions & 16 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1926,41 +1926,35 @@ nfsd4_destroy_session(struct svc_rqst *r,
struct nfsd4_destroy_session *sessionid)
{
struct nfsd4_session *ses;
__be32 status = nfserr_badsession;
__be32 status;
struct nfsd_net *nn = net_generic(SVC_NET(r), nfsd_net_id);

/* Notes:
* - The confirmed nfs4_client->cl_sessionid holds destroyed sessinid
* - Should we return nfserr_back_chan_busy if waiting for
* callbacks on to-be-destroyed session?
* - Do we need to clear any callback info from previous session?
*/

nfs4_lock_state();
status = nfserr_not_only_op;
if (nfsd4_compound_in_session(cstate->session, &sessionid->sessionid)) {
if (!nfsd4_last_compound_op(r))
return nfserr_not_only_op;
goto out;
}
dump_sessionid(__func__, &sessionid->sessionid);
spin_lock(&nn->client_lock);
ses = find_in_sessionid_hashtbl(&sessionid->sessionid, SVC_NET(r));
if (!ses) {
spin_unlock(&nn->client_lock);
goto out;
}
status = nfserr_badsession;
if (!ses)
goto out_client_lock;

unhash_session(ses);
spin_unlock(&nn->client_lock);

nfs4_lock_state();
nfsd4_probe_callback_sync(ses->se_client);
nfs4_unlock_state();

spin_lock(&nn->client_lock);
nfsd4_del_conns(ses);
nfsd4_put_session_locked(ses);
spin_unlock(&nn->client_lock);
status = nfs_ok;
out_client_lock:
spin_unlock(&nn->client_lock);
out:
nfs4_unlock_state();
return status;
}

Expand Down

0 comments on commit ca67524

Please sign in to comment.