Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 372166
b: refs/heads/master
c: b0a9d3a
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields committed Apr 3, 2013
1 parent 989d6f5 commit b244c3e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 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: 9d313b17db965ae42137c5d4dd3063037544c4cd
refs/heads/master: b0a9d3ab577464529f6649ec54f8a0de160866e3
12 changes: 8 additions & 4 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ static void free_session(struct kref *kref)
__free_session(ses);
}

void nfsd4_put_session(struct nfsd4_session *ses)
static void nfsd4_put_session(struct nfsd4_session *ses)
{
struct nfsd_net *nn = net_generic(ses->se_client->net, nfsd_net_id);

Expand Down Expand Up @@ -1057,12 +1057,16 @@ release_session_client(struct nfsd4_session *session)
struct nfs4_client *clp = session->se_client;
struct nfsd_net *nn = net_generic(clp->net, nfsd_net_id);

nfsd4_put_session(session);
if (!atomic_dec_and_lock(&clp->cl_refcount, &nn->client_lock))
return;
if (is_client_expired(clp)) {
/*
* At this point we also know all sessions have refcnt 1,
* so free_client will delete them all if necessary:
*/
if (is_client_expired(clp))
free_client(clp);
session->se_client = NULL;
} else
else
renew_client_locked(clp);
spin_unlock(&nn->client_lock);
}
Expand Down
1 change: 0 additions & 1 deletion trunk/fs/nfsd/nfs4xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -3685,7 +3685,6 @@ nfs4svc_encode_compoundres(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_compo
}
/* Renew the clientid on success and on replay */
release_session_client(cs->session);
nfsd4_put_session(cs->session);
}
return 1;
}
Expand Down
2 changes: 0 additions & 2 deletions trunk/fs/nfsd/state.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,6 @@ struct nfsd4_session {
struct nfsd4_slot *se_slots[]; /* forward channel slots */
};

extern void nfsd4_put_session(struct nfsd4_session *ses);

/* formatted contents of nfs4_sessionid */
struct nfsd4_sessionid {
clientid_t clientid;
Expand Down

0 comments on commit b244c3e

Please sign in to comment.