Skip to contentSkip to conversation

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

PATCH In review Mi Jinlong 2 participants 2 messages Nov 11, 2010 – Nov 12, 2010

Subsystems (2)
lore
Share & tools
lore

Mi Jinlong

author
#0 lore raw

PATCH 1/1 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.

---
 fs/nfsd/nfs4state.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
fs/nfsd/nfs4state.c +2 -0
index 3876a9c..ea6466c 100644
@@ -745,6 +745,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) {
Signature · 1 line
1.7.0.1
#1 lore raw
Quoted 1 line · Mi Jinlong

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

Whoops, thanks--applying.

--b.

Quoted 24 lines
---
 fs/nfsd/nfs4state.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
fs/nfsd/nfs4state.c +2 -0
index 3876a9c..ea6466c 100644
@@ -745,6 +745,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) {
Signature · 1 line
1.7.0.1