summaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorMi Jinlong <mijinlong@cn.fujitsu.com>2010-11-11 11:03:50 +0100
committerJ. Bruce Fields <bfields@redhat.com>2010-11-20 00:35:12 +0100
commitced6dfe9fc7128995c6d60627938944b430d82c8 (patch)
tree87ba88ecc21a50ffe56c8815bd058f1f6a48cee9 /fs/nfsd
parentnfsd4: return serverfault on request for ssv (diff)
downloadlinux-ced6dfe9fc7128995c6d60627938944b430d82c8.tar.xz
linux-ced6dfe9fc7128995c6d60627938944b430d82c8.zip
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>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4state.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 9e7f8af12f8f..5d0ee0f0cb0e 100644
--- a/fs/nfsd/nfs4state.c
+++ b/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) {