Re: [PATCH v1 04/12] fsnotify: reduce i_lock hold time in fsnotify_set_children_dentry_flags()

From: NeilBrown

Date: Tue Aug 11 2026 - 00:52:47 EST


On Tue, 11 Aug 2026, Miklos Szeredi wrote:
> On Mon, 3 Aug 2026 at 03:39, NeilBrown <neilb@xxxxxxxxxxx> wrote:
>
> > + /* Find the dentry for inode - there can only be one */
> > + for_each_alias(alias, inode)
> > + break;
> > + dget(alias);
>
> This is __d_find_dir_alias().

True.

>
> Could add a get_dir_alias() primitive that does the i_lock locking as well?

We already have d_find_alias() and d_find_any_alias().
They seem much the same for directories, so I'll use d_find_alias().

Thanks for the suggestion.

NeilBrown


>
> Thanks,
> Miklos
>