Re: [PATCH] lru_cache: Initialize hlist_head in lc_create

Lars Ellenberg <[email protected]>
Newsgroups dev.linux.lists.drbd-dev,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Mon, Mar 11, 2024 at 11:07:35AM +0800, I-HSIN CHENG wrote:
> Use INIT_HLIST_HEAD to perform the initialization for each pointer to
> struct list_head in the variable "slot" to provide more safety and
> prevent possible bugs from uninitialized behavior.

Completely pointless.  It is kcalloc'd.  Why explicitly zero-out something
that was already explicitly zeroed out to begin with.

    Lars
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.