Re: [PATCH 04/10] commit-graph: move slab-clearing to close_commit_graph()

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

 



On Tue, Oct 03, 2023 at 04:27:52PM -0400, Jeff King wrote:
> When closing and freeing a commit-graph, the main entry point is
> close_commit_graph(), which then uses close_commit_graph_one() to
> recurse through the base_graph links and free each one.
>
> Commit 957ba814bf (commit-graph: when closing the graph, also release
> the slab, 2021-09-08) put the call to clear the slab into the recursive
> function, but this is pointless: there's only a single global slab
> variable. It works OK in practice because clearing the slab is
> idempotent, but it makes the code harder to reason about and refactor.

Well reasoned and explained, this change makes perfect sense to me.

Thanks,
Taylor



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux