]> git.karo-electronics.de Git - linux-beck.git/commitdiff
nfsd: Add layouts checking in client_has_state()
authorKinglong Mee <kinglongmee@gmail.com>
Tue, 21 Jul 2015 05:09:17 +0000 (13:09 +0800)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 10 Aug 2015 20:05:46 +0000 (16:05 -0400)
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>
fs/nfsd/nfs4state.c

index 84fb6eb5ff2f3410d79d33fa4f2115e36211fe11..c7000c33a7f0a461ca71ad8783332cc8d7529836 100644 (file)
@@ -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);
 }