diff options
author | J. Bruce Fields <bfields@redhat.com> | 2012-09-11 15:33:21 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2012-10-01 17:39:58 -0400 |
commit | 497305014864ea9e32adf7e8a06081209a5e7c42 (patch) | |
tree | cbbc5f14407e18bd6908cbdc2237156ca8e2cc96 | |
parent | d15c077e442d3c4167aaac87b3b7fe8ccad67a1f (diff) | |
download | linux-497305014864ea9e32adf7e8a06081209a5e7c42.tar.gz linux-497305014864ea9e32adf7e8a06081209a5e7c42.tar.bz2 linux-497305014864ea9e32adf7e8a06081209a5e7c42.zip |
nfsd4: reject bad forechannel attrs earlier
This could simplify the logic a little later.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r-- | fs/nfsd/nfs4state.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 550784219030..64938ca05c6d 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -1771,6 +1771,8 @@ nfsd4_create_session(struct svc_rqst *rqstp, if (cr_ses->flags & ~SESSION4_FLAG_MASK_A) return nfserr_inval; + if (check_forechannel_attrs(cr_ses->fore_channel)) + return nfserr_toosmall; nfs4_lock_state(); 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_RDMA; - status = nfserr_toosmall; - if (check_forechannel_attrs(cr_ses->fore_channel)) - goto out; - status = nfserr_jukebox; new = alloc_init_session(rqstp, conf, cr_ses); if (!new) |