Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192374
b: refs/heads/master
c: 5d4cec2
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields committed May 7, 2010
1 parent 88a552c commit c9f06ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 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: 5306293c9cd2caf41849cc909281bda628bb989e
refs/heads/master: 5d4cec2f2fdbb3d830fa014226d0d965df548bad
10 changes: 8 additions & 2 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1352,6 +1352,13 @@ static bool nfsd4_last_compound_op(struct svc_rqst *rqstp)
return argp->opcnt == resp->opcnt;
}

static bool nfsd4_compound_in_session(struct nfsd4_session *session, struct nfs4_sessionid *sid)
{
if (!session)
return 0;
return !memcmp(sid, &session->se_sessionid, sizeof(*sid));
}

__be32
nfsd4_destroy_session(struct svc_rqst *r,
struct nfsd4_compound_state *cstate,
Expand All @@ -1367,8 +1374,7 @@ nfsd4_destroy_session(struct svc_rqst *r,
* - Do we need to clear any callback info from previous session?
*/

if (!memcmp(&sessionid->sessionid, &cstate->session->se_sessionid,
sizeof(struct nfs4_sessionid))) {
if (nfsd4_compound_in_session(cstate->session, &sessionid->sessionid)) {
if (!nfsd4_last_compound_op(r))
return nfserr_not_only_op;
}
Expand Down

0 comments on commit c9f06ce

Please sign in to comment.