Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 47e970be authored by Kinglong Mee's avatar Kinglong Mee Committed by J. Bruce Fields
Browse files

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: default avatarKinglong Mee <kinglongmee@gmail.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent af9dbaf4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);
}