Re: [RFC PATCH 17/17] netfs: Combine prepare and issue ops and grab the buffers on request

David Howells <[email protected]>
Newsgroups dev.linux.lists.v9fs,dev.linux.lists.netfs,org.kernel.vger.ceph-devel,org.kernel.vger.linux-cifs,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-nfs
Organization Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903
Message-ID <[email protected]>
ChenXiaoSong <[email protected]> wrote:

> `netfs_put_request()` only decrements the reference count by one, while
> `netfs_put_failed_request()` (refcout == 2) immediately frees the request by
> calling `netfs_free_request()`.
> 
> Since the `refcount == 2` after `netfs_create_write_req() ->
> netfs_alloc_request()`, on the failure path, calling `netfs_put_request()`
> will not free the request.
> 
> Please let me know if my understanding is incorrect.

Actually, yes.  You're correct.  Anyway, I've made the change and pushed it.

David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.