瀏覽代碼

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>
Kinglong Mee 10 年之前
父節點
當前提交
47e970bee7
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      fs/nfsd/nfs4state.c

+ 3 - 0
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);
 }