From 0593bff4355550df36cb99c7fb6eef0a44ce0021 Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Tue, 29 May 2012 16:37:44 -0400 Subject: [PATCH] --- yaml --- r: 309867 b: refs/heads/master c: 6eccece90b6addf80ef9e6db79b0bc873301034b h: refs/heads/master i: 309865: 34f687c348e2fdbce23fe20e954ff42dfe095a49 309863: f5b9ee58c7cb28a59a2d9f0b6e2ac6d1b9f450b0 v: v3 --- [refs] | 2 +- trunk/fs/nfsd/nfs4state.c | 15 ++++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index 5a3bccc4d0ac..e2c2d7e14dc9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b9831b59f31eca65e1beec01fadf02ca82485813 +refs/heads/master: 6eccece90b6addf80ef9e6db79b0bc873301034b diff --git a/trunk/fs/nfsd/nfs4state.c b/trunk/fs/nfsd/nfs4state.c index c91e26d84f06..0a6901d45349 100644 --- a/trunk/fs/nfsd/nfs4state.c +++ b/trunk/fs/nfsd/nfs4state.c @@ -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 @@ -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) { @@ -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; }