aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2010-06-22 16:17:12 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2010-06-22 17:19:36 -0400
commit4731030d58a146630f5e8a0519661a5344a60f45 (patch)
tree53bb8f4296bf3b47d6195e13b542d68c6c7307a0 /fs
parent76407f76e0f71428f3c31faff004bff87fea51ba (diff)
nfsd4: translate memory errors to delay, not serverfault
If the server is out of memory is better for clients to back off and retry than to just error out. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfs4state.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 5a69ee69b44f..603076f66fe7 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -457,7 +457,7 @@ static int set_forechannel_drc_size(struct nfsd4_channel_attrs *fchan)
457 spin_unlock(&nfsd_drc_lock); 457 spin_unlock(&nfsd_drc_lock);
458 458
459 if (fchan->maxreqs == 0) 459 if (fchan->maxreqs == 0)
460 return nfserr_serverfault; 460 return nfserr_jukebox;
461 461
462 fchan->maxresp_cached = size + NFSD_MIN_HDR_SEQ_SZ; 462 fchan->maxresp_cached = size + NFSD_MIN_HDR_SEQ_SZ;
463 return 0; 463 return 0;
@@ -542,7 +542,7 @@ alloc_init_session(struct svc_rqst *rqstp, struct nfs4_client *clp,
542 BUILD_BUG_ON(NFSD_MAX_SLOTS_PER_SESSION * sizeof(struct nfsd4_slot) 542 BUILD_BUG_ON(NFSD_MAX_SLOTS_PER_SESSION * sizeof(struct nfsd4_slot)
543 + sizeof(struct nfsd4_session) > PAGE_SIZE); 543 + sizeof(struct nfsd4_session) > PAGE_SIZE);
544 544
545 status = nfserr_serverfault; 545 status = nfserr_jukebox;
546 /* allocate struct nfsd4_session and slot table pointers in one piece */ 546 /* allocate struct nfsd4_session and slot table pointers in one piece */
547 slotsize = tmp.se_fchannel.maxreqs * sizeof(struct nfsd4_slot *); 547 slotsize = tmp.se_fchannel.maxreqs * sizeof(struct nfsd4_slot *);
548 new = kzalloc(sizeof(*new) + slotsize, GFP_KERNEL); 548 new = kzalloc(sizeof(*new) + slotsize, GFP_KERNEL);
@@ -1219,7 +1219,7 @@ out_new:
1219 /* Normal case */ 1219 /* Normal case */
1220 new = create_client(exid->clname, dname, rqstp, &verf); 1220 new = create_client(exid->clname, dname, rqstp, &verf);
1221 if (new == NULL) { 1221 if (new == NULL) {
1222 status = nfserr_serverfault; 1222 status = nfserr_jukebox;
1223 goto out; 1223 goto out;
1224 } 1224 }
1225 1225