lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 6 Jan 2024 16:36:27 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Pierre Gondois <pierre.gondois@....com>
Cc: linux-kernel@...r.kernel.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Arve Hjønnevåg <arve@...roid.com>,
	Todd Kjos <tkjos@...roid.com>, Martijn Coenen <maco@...roid.com>,
	Joel Fernandes <joel@...lfernandes.org>,
	Christian Brauner <brauner@...nel.org>,
	Carlos Llamas <cmllamas@...gle.com>,
	Suren Baghdasaryan <surenb@...gle.com>, Coly Li <colyli@...e.de>,
	Kent Overstreet <kent.overstreet@...il.com>,
	Marco Elver <elver@...gle.com>, Kees Cook <keescook@...omium.org>,
	Lucas De Marchi <lucas.demarchi@...el.com>,
	Ingo Molnar <mingo@...nel.org>, linux-bcache@...r.kernel.org
Subject: Re: [PATCH v2 3/3] bcache: Use of hlist_count_nodes()

On Thu, Jan 04, 2024 at 05:49:35PM +0100, Pierre Gondois wrote:
> Make use of the newly added hlist_count_nodes().

...

>  	for (h = c->bucket_hash;
>  	     h < c->bucket_hash + (1 << BUCKET_HASH_BITS);
>  	     h++) {
> -		unsigned int i = 0;
> -		struct hlist_node *p;
> -
> -		hlist_for_each(p, h)
> -			i++;
> -
> -		ret = max(ret, i);
> +		ret = max(ret, hlist_count_nodes(h));
>  	}

After this you probably may drop {}.


-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ