diff options
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index c91e26d84f06..0a6901d45349 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -1537,9 +1537,9 @@ static bool client_has_state(struct nfs4_client *clp) | |||
1537 | * | 1537 | * |
1538 | * Also note we should probably be using this in 4.0 case too. | 1538 | * Also note we should probably be using this in 4.0 case too. |
1539 | */ | 1539 | */ |
1540 | return list_empty(&clp->cl_openowners) | 1540 | return !list_empty(&clp->cl_openowners) |
1541 | && list_empty(&clp->cl_delegations) | 1541 | || !list_empty(&clp->cl_delegations) |
1542 | && list_empty(&clp->cl_sessions); | 1542 | || !list_empty(&clp->cl_sessions); |
1543 | } | 1543 | } |
1544 | 1544 | ||
1545 | __be32 | 1545 | __be32 |
@@ -2069,13 +2069,6 @@ out: | |||
2069 | return status; | 2069 | return status; |
2070 | } | 2070 | } |
2071 | 2071 | ||
2072 | static inline bool has_resources(struct nfs4_client *clp) | ||
2073 | { | ||
2074 | return !list_empty(&clp->cl_openowners) | ||
2075 | || !list_empty(&clp->cl_delegations) | ||
2076 | || !list_empty(&clp->cl_sessions); | ||
2077 | } | ||
2078 | |||
2079 | __be32 | 2072 | __be32 |
2080 | nfsd4_destroy_clientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_destroy_clientid *dc) | 2073 | nfsd4_destroy_clientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_destroy_clientid *dc) |
2081 | { | 2074 | { |
@@ -2089,7 +2082,7 @@ nfsd4_destroy_clientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *csta | |||
2089 | if (conf) { | 2082 | if (conf) { |
2090 | clp = conf; | 2083 | clp = conf; |
2091 | 2084 | ||
2092 | if (!is_client_expired(conf) && has_resources(conf)) { | 2085 | if (!is_client_expired(conf) && client_has_state(conf)) { |
2093 | status = nfserr_clientid_busy; | 2086 | status = nfserr_clientid_busy; |
2094 | goto out; | 2087 | goto out; |
2095 | } | 2088 | } |