浏览代码

NFS4.1: server gets drc mem fail should reply error at create_session

When server gets drc mem fail, it should reply error to client.

Signed-off-by: Mi Jinlong <mijinlong@cn.fujitsu.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Mi Jinlong 14 年之前
父节点
当前提交
ced6dfe9fc
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      fs/nfsd/nfs4state.c

+ 2 - 0
fs/nfsd/nfs4state.c

@@ -749,6 +749,8 @@ static struct nfsd4_session *alloc_init_session(struct svc_rqst *rqstp, struct n
 	 */
 	slotsize = nfsd4_sanitize_slot_size(fchan->maxresp_cached);
 	numslots = nfsd4_get_drc_mem(slotsize, fchan->maxreqs);
+	if (numslots < 1)
+		return NULL;
 
 	new = alloc_session(slotsize, numslots);
 	if (!new) {