Re: [RFC PATCH v2 4/4] get rid of busy-waiting in shrink_dcache_tree()

Linus Torvalds
2026-04-04T00:04:46Z

On Fri, 3 Apr 2026 at 16:58, Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> FWIW, I wonder if we would be better off with something like
>
> struct completion_list {
> struct completion completion;
> struct completion_list *next;
> };
>
> embedded into select_data, with dentry->waiters being a pointer
> to that. It's just that dragging struct select_data into that,
> even as an opaque pointer, tastes wrong ;-/
>
> Preferences?

I have no strong preferences in this area.

The opaque pointer is fine by me, because it's type-safe without
exposing internal implementation or having people being able to much
around with the fields.

But if you prefer a completion list, i don't see that being a problem
either. So entirely up to you.

Linus