* [PATCH] NFS4.1: server gets drc mem fail should reply error at create_session
@ 2010-11-11 10:03 Mi Jinlong
2010-11-12 20:13 ` J. Bruce Fields
0 siblings, 1 reply; 2+ messages in thread
From: Mi Jinlong @ 2010-11-11 10:03 UTC (permalink / raw)
To: J. Bruce Fields; +Cc: NFSv3 list
When server gets drc mem fail, it should reply error to client.
Signed-off-by: Mi Jinlong <mijinlong@cn.fujitsu.com>
---
fs/nfsd/nfs4state.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 3876a9c..ea6466c 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -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) {
--
1.7.0.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] NFS4.1: server gets drc mem fail should reply error at create_session
2010-11-11 10:03 [PATCH] NFS4.1: server gets drc mem fail should reply error at create_session Mi Jinlong
@ 2010-11-12 20:13 ` J. Bruce Fields
0 siblings, 0 replies; 2+ messages in thread
From: J. Bruce Fields @ 2010-11-12 20:13 UTC (permalink / raw)
To: Mi Jinlong; +Cc: NFSv3 list
On Thu, Nov 11, 2010 at 06:03:50PM +0800, Mi Jinlong wrote:
> When server gets drc mem fail, it should reply error to client.
Whoops, thanks--applying.
--b.
>
> Signed-off-by: Mi Jinlong <mijinlong@cn.fujitsu.com>
> ---
> fs/nfsd/nfs4state.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index 3876a9c..ea6466c 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -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) {
> --
> 1.7.0.1
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-12 20:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-11 10:03 [PATCH] NFS4.1: server gets drc mem fail should reply error at create_session Mi Jinlong
2010-11-12 20:13 ` J. Bruce Fields
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).