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]
Message-ID: <CA+55aFw2tODqepCea+wWatE+sVeRcsn6cfSzUqSBOhKau2ZB5w@mail.gmail.com>
Date:	Tue, 17 Feb 2015 12:20:20 -0800
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Jeff Layton <jeff.layton@...marydata.com>
Cc:	linux-fsdevel <linux-fsdevel@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"Kirill A. Shutemov" <kirill@...temov.name>,
	"J. Bruce Fields" <bfields@...ldses.org>,
	Christoph Hellwig <hch@....de>,
	Dave Chinner <david@...morbit.com>,
	Sasha Levin <sasha.levin@...cle.com>
Subject: Re: [PATCH 0/4] locks: flock and lease related bugfixes, and remove
 i_flctx counters

On Tue, Feb 17, 2015 at 11:55 AM, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>
> I do believe that we should add a "list_count()" function, so that we could write
>
>    *flock_count = list_count(&ctx->flc_flock);
>
> instead of that horribly ugly
>
>     list_for_each_entry(lock, &ctx->flc_flock, fl_list)
>          ++(*flock_count);
>
> thing. But that's a separate cleanup.

The helper function would possibly be something like this.

Untested. It may mix-count, or it might do unspeakable acts on your
pets. No guarantees.

                        Linus

View attachment "patch.diff" of type "text/plain" (1178 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ