# HG changeset patch # User Daniil Lunev # Date 1346813734 18000 # Node ID 23fd30d0ae038f49cfd8bc19c19981d785093d79 # Parent 63b4afd261aaa0de7397dae6352ab8b864a42efd 3158 nfs: Server should return NFS4_OK with zero length COMPOUND request Reviewed by: Eric Schrock Approved by: Richard Lowe diff -r 63b4afd261aa -r 23fd30d0ae03 usr/src/uts/common/fs/nfs/nfs4_srv.c --- a/usr/src/uts/common/fs/nfs/nfs4_srv.c Thu Aug 30 15:52:25 2012 -0500 +++ b/usr/src/uts/common/fs/nfs/nfs4_srv.c Tue Sep 04 21:55:34 2012 -0500 @@ -5804,13 +5804,12 @@ cs.statusp = &resp->status; cs.req = req; + resp->array = NULL; + resp->array_len = 0; resp->status = utf8_name_verify(&(resp->tag)); - if (resp->status != NFS4_OK) { - resp->array_len = 0; - resp->array = NULL; + if (resp->status != NFS4_OK) return; - } /* * XXX for now, minorversion should be zero @@ -5818,14 +5817,17 @@ if (args->minorversion != NFS4_MINORVERSION) { DTRACE_NFSV4_2(compound__start, struct compound_state *, &cs, COMPOUND4args *, args); - resp->array_len = 0; - resp->array = NULL; resp->status = NFS4ERR_MINOR_VERS_MISMATCH; DTRACE_NFSV4_2(compound__done, struct compound_state *, &cs, COMPOUND4res *, resp); return; } + if (args->array_len == 0) { + resp->status = NFS4_OK; + return; + } + ASSERT(exi == NULL); ASSERT(cr == NULL);