nfsd4: reject bad forechannel attrs earlier
This could simplify the logic a little later. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
parent
d15c077e44
commit
4973050148
1 changed files with 2 additions and 4 deletions
|
@ -1771,6 +1771,8 @@ nfsd4_create_session(struct svc_rqst *rqstp,
|
||||||
|
|
||||||
if (cr_ses->flags & ~SESSION4_FLAG_MASK_A)
|
if (cr_ses->flags & ~SESSION4_FLAG_MASK_A)
|
||||||
return nfserr_inval;
|
return nfserr_inval;
|
||||||
|
if (check_forechannel_attrs(cr_ses->fore_channel))
|
||||||
|
return nfserr_toosmall;
|
||||||
|
|
||||||
nfs4_lock_state();
|
nfs4_lock_state();
|
||||||
unconf = find_unconfirmed_client(&cr_ses->clientid, true);
|
unconf = find_unconfirmed_client(&cr_ses->clientid, true);
|
||||||
|
@ -1811,10 +1813,6 @@ nfsd4_create_session(struct svc_rqst *rqstp,
|
||||||
cr_ses->flags &= ~SESSION4_PERSIST;
|
cr_ses->flags &= ~SESSION4_PERSIST;
|
||||||
cr_ses->flags &= ~SESSION4_RDMA;
|
cr_ses->flags &= ~SESSION4_RDMA;
|
||||||
|
|
||||||
status = nfserr_toosmall;
|
|
||||||
if (check_forechannel_attrs(cr_ses->fore_channel))
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
status = nfserr_jukebox;
|
status = nfserr_jukebox;
|
||||||
new = alloc_init_session(rqstp, conf, cr_ses);
|
new = alloc_init_session(rqstp, conf, cr_ses);
|
||||||
if (!new)
|
if (!new)
|
||||||
|
|
Loading…
Add table
Reference in a new issue