Re: [RFC PATCH 17/17] netfs: Combine prepare and issue ops and grab the buffers on request
From: David Howells
Date: Tue Mar 24 2026 - 04:16:09 EST
ChenXiaoSong <chenxiaosong@xxxxxxxxxxxxxxxx> 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