Re: [PATCH v1 1/5] SUNRPC: Fix the calculation of xdr->end in xdr_get_next_encode_buffer()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Jun 6, 2022, at 10:35 PM, Chuck Lever III <chuck.lever@xxxxxxxxxx> wrote:
> 
>> On Jun 6, 2022, at 8:59 PM, NeilBrown <neilb@xxxxxxx> wrote:
>> We then assign frag{1,2}bytes and have another chunk of code that looks
>> wrong to me.  I'd like
>> 
>>  if (xdr->iov) {
>> 	xdr->iov->iov_len += frag1bytes;
>> 	xdr->iov = NULL;
>>  } else {
>>       xdr->buf->page_len += frag1bytes;
>>       xdr->page_ptr++;
>>  }
>> 
>> Note that this changes the code NOT to increment pagE_ptr if iov was not
>> NULL.  I cannot see how it would be correct to do that.  Presumably this
>> code is never called with iov != NULL ???
> 
> That strikes me as a good change. I will add it to this series as
> another patch.
> 
> Yes, this code is called by the server's READDIR encoder with iov = NULL.
> See nfsd3_init_dirlist_pages().

This change breaks READDIR, looks like.

--
Chuck Lever







[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux