diff options
author | Weston Andros Adamson <dros@netapp.com> | 2013-08-05 21:47:07 +0200 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2013-08-07 18:06:07 +0200 |
commit | 58cd57bfd9db3bc213bf9d6a10920f82095f0114 (patch) | |
tree | 231ef9a0cc18f0b631e9a33e3e7a66d167fc6186 /fs/nfsd/nfs4xdr.c | |
parent | nfsd4: Fix MACH_CRED NULL dereference (diff) | |
download | linux-58cd57bfd9db3bc213bf9d6a10920f82095f0114.tar.xz linux-58cd57bfd9db3bc213bf9d6a10920f82095f0114.zip |
nfsd: Fix SP4_MACH_CRED negotiation in EXCHANGE_ID
- don't BUG_ON() when not SP4_NONE
- calculate recv and send reserve sizes correctly
Signed-off-by: Weston Andros Adamson <dros@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 0c0f3ea90de5..c2a4701d7286 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -3360,7 +3360,8 @@ nfsd4_encode_exchange_id(struct nfsd4_compoundres *resp, __be32 nfserr, 8 /* eir_clientid */ + 4 /* eir_sequenceid */ + 4 /* eir_flags */ + - 4 /* spr_how (SP4_NONE) */ + + 4 /* spr_how */ + + 8 /* spo_must_enforce, spo_must_allow */ + 8 /* so_minor_id */ + 4 /* so_major_id.len */ + (XDR_QUADLEN(major_id_sz) * 4) + @@ -3372,8 +3373,6 @@ nfsd4_encode_exchange_id(struct nfsd4_compoundres *resp, __be32 nfserr, WRITE32(exid->seqid); WRITE32(exid->flags); - /* state_protect4_r. Currently only support SP4_NONE */ - BUG_ON(exid->spa_how != SP4_NONE); WRITE32(exid->spa_how); switch (exid->spa_how) { case SP4_NONE: |