Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309867
b: refs/heads/master
c: 6eccece
h: refs/heads/master
i:
  309865: 34f687c
  309863: f5b9ee5
v: v3
  • Loading branch information
J. Bruce Fields committed Jun 1, 2012
1 parent ddd80b5 commit 0593bff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 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: b9831b59f31eca65e1beec01fadf02ca82485813
refs/heads/master: 6eccece90b6addf80ef9e6db79b0bc873301034b
15 changes: 4 additions & 11 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1537,9 +1537,9 @@ static bool client_has_state(struct nfs4_client *clp)
*
* Also note we should probably be using this in 4.0 case too.
*/
return list_empty(&clp->cl_openowners)
&& list_empty(&clp->cl_delegations)
&& list_empty(&clp->cl_sessions);
return !list_empty(&clp->cl_openowners)
|| !list_empty(&clp->cl_delegations)
|| !list_empty(&clp->cl_sessions);
}

__be32
Expand Down Expand Up @@ -2069,13 +2069,6 @@ nfsd4_sequence(struct svc_rqst *rqstp,
return status;
}

static inline bool has_resources(struct nfs4_client *clp)
{
return !list_empty(&clp->cl_openowners)
|| !list_empty(&clp->cl_delegations)
|| !list_empty(&clp->cl_sessions);
}

__be32
nfsd4_destroy_clientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_destroy_clientid *dc)
{
Expand All @@ -2089,7 +2082,7 @@ nfsd4_destroy_clientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *csta
if (conf) {
clp = conf;

if (!is_client_expired(conf) && has_resources(conf)) {
if (!is_client_expired(conf) && client_has_state(conf)) {
status = nfserr_clientid_busy;
goto out;
}
Expand Down

0 comments on commit 0593bff

Please sign in to comment.