Re: [PATCH v1 01/12] VFS: don't count references through ->d_parent

Miklos Szeredi <[email protected]>
Newsgroups gmane.comp.file-systems.ceph.devel,gmane.linux.kernel.autofs,gmane.linux.kernel,gmane.comp.file-systems.coda.general,gmane.linux.file-systems,gmane.linux.nfs
Message-ID <CAJfpeguZh6Bo7hxVW5f-OvKJ3UazJTn26Wkba8+rXY-LC-QNWA@mail.gmail.com>
On Tue, 11 Aug 2026 at 04:12, NeilBrown <[email protected]> wrote:

> --- a/fs/libfs.c
> +++ b/fs/libfs.c
> @@ -169,6 +169,8 @@ loff_t dcache_dir_lseek(struct file *file, loff_t offset, int whence)
>                 hlist_del_init(&cursor->d_sib);
>                 if (to)
>                         hlist_add_behind(&cursor->d_sib, &to->d_sib);
> +               else if (hlist_empty(&dentry->d_children)
> +                       dput_dlock(dentry);

you mean dput_dlock(cursor)?

But that's no good, since the directory could be repopulated and the
cursor needed again.

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.