Re: [PATCH 4/7] nfsd: nfs4xdr encode_stateid helper function

Benny Halevy
2008-08-13T07:28:07Z

On Aug. 12, 2008, 21:39 +0300, "J. Bruce Fields" <bfields@fieldses.org> wrote:
> On Tue, Aug 12, 2008 at 08:45:07PM +0300, Benny Halevy wrote:
>> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
>> ---
>> fs/nfsd/nfs4xdr.c | 76 ++++++++++++++++++++++------------------------------
>> 1 files changed, 32 insertions(+), 44 deletions(-)
>>
>> diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
>> index 4ec52f9..96da1aa 100644
>> --- a/fs/nfsd/nfs4xdr.c
>> +++ b/fs/nfsd/nfs4xdr.c
> ...
>> @@ -2083,12 +2091,9 @@ nfsd4_encode_lock(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_lo
>> {
>> ENCODE_SEQID_OP_HEAD;
>>
>> - if (!nfserr) {
>> - RESERVE_SPACE(4 + sizeof(stateid_t));
>
> Hm, so that was a little over before (a harmless error, but better to
> have it fixed).

True. I can add a preliminary patch fixing that.

Benny

>
> --b.
>
>> - WRITE32(lock->lk_resp_stateid.si_generation);
>> - WRITEMEM(&lock->lk_resp_stateid.si_opaque, sizeof(stateid_opaque_t));
>> - ADJUST_ARGS();