Re: [RFC PATCH 17/17] netfs: Combine prepare and issue ops and grab the buffers on request
ChenXiaoSong <[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 |
|---|---|
| Message-ID | <[email protected]> |
`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. Thanks, ChenXiaoSong <[email protected]> On 3/24/26 15:16, David Howells wrote: > It doesn't matter exactly, as the only difference really is whether it gets > bumped over to a workqueue, but it's probably better to avoid that if we can.