NFSD: Simplify GSS flavor encoding in nfsd4_do_encode_secinfo()
authorChuck Lever <chuck.lever@oracle.com>
Tue, 30 Apr 2013 22:48:45 +0000 (18:48 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 30 Apr 2013 23:18:21 +0000 (19:18 -0400)
Clean up.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4xdr.c

index 78272185a13d6846225002a0694068e61fe2dc03..a885e97dc5f491fe3adb02d94be44dae8f289e79 100644 (file)
@@ -3119,17 +3119,11 @@ nfsd4_do_encode_secinfo(struct nfsd4_compoundres *resp,
                struct rpcsec_gss_info info;
 
                if (rpcauth_get_gssinfo(flavs[i].pseudoflavor, &info) == 0) {
-                       RESERVE_SPACE(4);
+                       RESERVE_SPACE(4 + 4 + info.oid.len + 4 + 4);
                        WRITE32(RPC_AUTH_GSS);
-                       ADJUST_ARGS();
-                       RESERVE_SPACE(4 + info.oid.len);
                        WRITE32(info.oid.len);
                        WRITEMEM(info.oid.data, info.oid.len);
-                       ADJUST_ARGS();
-                       RESERVE_SPACE(4);
                        WRITE32(info.qop);
-                       ADJUST_ARGS();
-                       RESERVE_SPACE(4);
                        WRITE32(info.service);
                        ADJUST_ARGS();
                } else {