Re: [PATCH V4 1/2] cgroup/rstat: Helper functions for locking expose trylock

From: Jesper Dangaard Brouer
Date: Fri Jun 28 2024 - 08:13:46 EST




On 28/06/2024 00.22, Waiman Long wrote:

On 6/27/24 17:18, Jesper Dangaard Brouer wrote:
[...]

Will it be cleaner to add a "bool *flushed" output parameter to __cgroup_rstat_lock() so that the caller can respond differently whether the flushed flag is set or not? In that way, you don't need to expose a separate trylock() API. Also your commit log is empty.


Dropping this API in V5 anyway.
But I do think it is more natural to follow the 'trylock' API as this is
something that people have seen before.

--Jesper