aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfsd/nfs4state.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index bac6207191d5..f2ea343086b8 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2256,16 +2256,20 @@ nfsd4_set_ex_flags(struct nfs4_client *new, struct nfsd4_exchange_id *clid)
2256 clid->flags = new->cl_exchange_flags; 2256 clid->flags = new->cl_exchange_flags;
2257} 2257}
2258 2258
2259static bool client_has_openowners(struct nfs4_client *clp)
2260{
2261 struct nfs4_openowner *oo;
2262
2263 list_for_each_entry(oo, &clp->cl_openowners, oo_perclient) {
2264 if (!list_empty(&oo->oo_owner.so_stateids))
2265 return true;
2266 }
2267 return false;
2268}
2269
2259static bool client_has_state(struct nfs4_client *clp) 2270static bool client_has_state(struct nfs4_client *clp)
2260{ 2271{
2261 /* 2272 return client_has_openowners(clp)
2262 * Note clp->cl_openowners check isn't quite right: there's no
2263 * need to count owners without stateid's.
2264 *
2265 * Also note in 4.0 case should also be checking for openowners
2266 * kept around just for close handling.
2267 */
2268 return !list_empty(&clp->cl_openowners)
2269#ifdef CONFIG_NFSD_PNFS 2273#ifdef CONFIG_NFSD_PNFS
2270 || !list_empty(&clp->cl_lo_states) 2274 || !list_empty(&clp->cl_lo_states)
2271#endif 2275#endif