Re: [PATCH 14/26] NFS: merge _full and _partial read rpc_ops

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

 



On Mon, Apr 16, 2012 at 4:28 PM, Myklebust, Trond
<Trond.Myklebust@xxxxxxxxxx> wrote:
> On Mon, 2012-04-09 at 16:52 -0400, Fred Isaman wrote:
>> @@ -64,10 +80,16 @@ void nfs_readhdr_free(struct nfs_pgio_header *hdr)
>>
>>  void nfs_readdata_release(struct nfs_read_data *rdata)
>>  {
>> +     struct nfs_pgio_header *hdr = rdata->header;
>> +
>>       put_nfs_open_context(rdata->args.context);
>>       if (rdata->pages.pagevec != rdata->pages.page_array)
>>               kfree(rdata->pages.pagevec);
>> -     nfs_readhdr_free(rdata->header);
>> +     if (container_of(hdr, struct nfs_read_header, header) !=
>> +         container_of(rdata, struct nfs_read_header, rpc_data))
>> +             kfree(rdata);
>
> This looks unnecessarily complicated. How about
>
>        if (rdata != &hdr->rpc_data)
>                kfree(rdata);
>

That won't work.  There is no hdr->rpc_data.

Fred
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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