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

NeilBrown <[email protected]>
Newsgroups gmane.linux.file-systems,gmane.linux.kernel.autofs,gmane.linux.kernel,gmane.comp.file-systems.ceph.devel,gmane.comp.file-systems.coda.general,gmane.linux.nfs
Message-ID <[email protected]>
On Tue, 11 Aug 2026, Miklos Szeredi wrote:
> On Mon, 3 Aug 2026 at 03:39, NeilBrown <[email protected]> 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
>
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.