summaryrefslogtreecommitdiff
path: root/fs/nfsd
diff options
context:
space:
mode:
authorKinglong Mee <kinglongmee@gmail.com>2015-07-21 08:09:17 +0300
committerJ. Bruce Fields <bfields@redhat.com>2015-08-10 23:05:46 +0300
commit47e970bee7e83d997be11d91d2fbc7f64c8bb89e (patch)
treef34c43211bd9aaa469125068a2b571554ad53064 /fs/nfsd
parentaf9dbaf48d00a34c2933ed0c0e9c82b37eb16356 (diff)
downloadlinux-47e970bee7e83d997be11d91d2fbc7f64c8bb89e.tar.xz
nfsd: Add layouts checking in client_has_state()
Layout is a state resource, nfsd should check it too. v2, drop unneeded updating in nfsd4_renew() v3, fix compile error without CONFIG_NFSD_PNFS Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4state.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 84fb6eb5ff2f..c7000c33a7f0 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2241,6 +2241,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)
+#ifdef CONFIG_NFSD_PNFS
+ || !list_empty(&clp->cl_lo_states)
+#endif
|| !list_empty(&clp->cl_delegations)
|| !list_empty(&clp->cl_sessions);
}