提交 bdac86e2 编写于 作者: A Andy Adamson 提交者: J. Bruce Fields

nfsd41: replace nfserr_resource in pure nfs41 responses

nfserr_resource is not a legal error for NFSv4.1. Replace it with
nfserr_serverfault for EXCHANGE_ID and CREATE_SESSION processing.

We will also need to map nfserr_resource to other errors in routines shared
by NFSv4.0 and NFSv4.1
Signed-off-by: NAndy Adamson <andros@netapp.com>
Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
上级 a8dfdaeb
...@@ -469,7 +469,7 @@ static int set_forechannel_drc_size(struct nfsd4_channel_attrs *fchan) ...@@ -469,7 +469,7 @@ static int set_forechannel_drc_size(struct nfsd4_channel_attrs *fchan)
spin_unlock(&nfsd_drc_lock); spin_unlock(&nfsd_drc_lock);
if (fchan->maxreqs == 0) if (fchan->maxreqs == 0)
return nfserr_resource; return nfserr_serverfault;
fchan->maxresp_cached = size + NFSD_MIN_HDR_SEQ_SZ; fchan->maxresp_cached = size + NFSD_MIN_HDR_SEQ_SZ;
return 0; return 0;
...@@ -519,7 +519,7 @@ alloc_init_session(struct svc_rqst *rqstp, struct nfs4_client *clp, ...@@ -519,7 +519,7 @@ alloc_init_session(struct svc_rqst *rqstp, struct nfs4_client *clp,
struct nfsd4_create_session *cses) struct nfsd4_create_session *cses)
{ {
struct nfsd4_session *new, tmp; struct nfsd4_session *new, tmp;
int idx, status = nfserr_resource, slotsize; int idx, status = nfserr_serverfault, slotsize;
memset(&tmp, 0, sizeof(tmp)); memset(&tmp, 0, sizeof(tmp));
...@@ -1282,7 +1282,7 @@ nfsd4_exchange_id(struct svc_rqst *rqstp, ...@@ -1282,7 +1282,7 @@ nfsd4_exchange_id(struct svc_rqst *rqstp,
/* Normal case */ /* Normal case */
new = create_client(exid->clname, dname); new = create_client(exid->clname, dname);
if (new == NULL) { if (new == NULL) {
status = nfserr_resource; status = nfserr_serverfault;
goto out; goto out;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册