Re: [PATCH v1 01/12] VFS: don't count references through ->d_parent
From: Miklos Szeredi
Date: Tue Aug 11 2026 - 08:17:15 EST
On Tue, 11 Aug 2026 at 04:12, NeilBrown <neilb@xxxxxxxxxxx> 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